ethanchern
commited on
Commit
•
43119c7
1
Parent(s):
ec8d603
Update app.py
Browse files
app.py
CHANGED
@@ -46,12 +46,13 @@ with gr.Blocks() as demo:
|
|
46 |
scraper_api_key = gr.Textbox(label="Scraper API Key")
|
47 |
chat_model = gr.inputs.Radio(choices=["gpt-3.5-turbo", "gpt-4"], label="Chat Model")
|
48 |
prompt = gr.Textbox(label="Prompt")
|
|
|
49 |
response = gr.Textbox(label="Response")
|
50 |
category = gr.inputs.Radio(choices=["kbqa", "code", "math", "scientific"], label="Category")
|
51 |
fact_check_model = gr.inputs.Radio(choices=["gpt-3.5-turbo", "gpt-4"], label="Fact Check Model")
|
52 |
fact_check_result = gr.Textbox(label="Fact Check Result")
|
53 |
-
chat_btn = gr.Button("
|
54 |
-
fact_check_btn = gr.Button("
|
55 |
chat_btn.click(chat_with_gpt, inputs=[openai_api_key,chat_model,prompt], outputs=response)
|
56 |
fact_check_btn.click(fact_check, inputs=[openai_api_key,serper_api_key,scraper_api_key,fact_check_model,prompt,response,category], outputs=fact_check_result)
|
57 |
|
|
|
46 |
scraper_api_key = gr.Textbox(label="Scraper API Key")
|
47 |
chat_model = gr.inputs.Radio(choices=["gpt-3.5-turbo", "gpt-4"], label="Chat Model")
|
48 |
prompt = gr.Textbox(label="Prompt")
|
49 |
+
chat_btn = gr.Button("Get Response!")
|
50 |
response = gr.Textbox(label="Response")
|
51 |
category = gr.inputs.Radio(choices=["kbqa", "code", "math", "scientific"], label="Category")
|
52 |
fact_check_model = gr.inputs.Radio(choices=["gpt-3.5-turbo", "gpt-4"], label="Fact Check Model")
|
53 |
fact_check_result = gr.Textbox(label="Fact Check Result")
|
54 |
+
# chat_btn = gr.Button("Get Response!")
|
55 |
+
fact_check_btn = gr.Button("Run FactTool!")
|
56 |
chat_btn.click(chat_with_gpt, inputs=[openai_api_key,chat_model,prompt], outputs=response)
|
57 |
fact_check_btn.click(fact_check, inputs=[openai_api_key,serper_api_key,scraper_api_key,fact_check_model,prompt,response,category], outputs=fact_check_result)
|
58 |
|