alexkueck commited on
Commit
e378e6a
·
verified ·
1 Parent(s): 8fa8dd1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -391,7 +391,7 @@ def generate(text, history, rag_option, model_option, k=3, top_p=0.6, temperatu
391
  ########################################
392
  #Evaluation
393
  ########################################
394
- evaluation_llm = ChatOpenAI(model="gpt-4")
395
 
396
  # create evaluator
397
  evaluator = load_evaluator("criteria", criteria="conciseness", llm=evaluation_llm)
@@ -405,10 +405,16 @@ evaluator = load_evaluator("criteria", criteria="conciseness", llm=evaluation_ll
405
  print ("Start GUI")
406
  with open("custom.css", "r", encoding="utf-8") as f:
407
  customCSS = f.read()
408
-
409
  with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
410
  history = gr.State([])
411
  user_question = gr.State("")
 
 
 
 
 
 
412
  with gr.Row():
413
  gr.HTML("LI Chatot")
414
  status_display = gr.Markdown("Success", elem_id="status_display")
 
391
  ########################################
392
  #Evaluation
393
  ########################################
394
+ evaluation_llm = ChatOpenAI(model="Inference Endpoint")
395
 
396
  # create evaluator
397
  evaluator = load_evaluator("criteria", criteria="conciseness", llm=evaluation_llm)
 
405
  print ("Start GUI")
406
  with open("custom.css", "r", encoding="utf-8") as f:
407
  customCSS = f.read()
408
+
409
  with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
410
  history = gr.State([])
411
  user_question = gr.State("")
412
+
413
+ with gr.Row():
414
+ user_input_validate =gr.Textbox(label= "Bitte das oben im Moodle Kurs angegebene Wort eingeben, um die Anwendung zu starten", visible=True, interactive=True, scale= 7)
415
+ validate_btn = gr.Button("Validieren", visible = True)
416
+ #validation_result = gr.Text(label="Validierungsergebnis")
417
+
418
  with gr.Row():
419
  gr.HTML("LI Chatot")
420
  status_display = gr.Markdown("Success", elem_id="status_display")