Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -779,6 +779,13 @@ with gr.Blocks() as demo:
|
|
779 |
web_search_checkbox = gr.Checkbox(label="Enable Web Search", value=False)
|
780 |
google_news_rss_checkbox = gr.Checkbox(label="Google News RSS", value=False)
|
781 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
782 |
with gr.Row():
|
783 |
bank_dropdown = gr.Dropdown(
|
784 |
choices=list(website_configs.keys()),
|
@@ -797,12 +804,6 @@ with gr.Blocks() as demo:
|
|
797 |
outputs=news_fetch_output
|
798 |
)
|
799 |
|
800 |
-
def chat(question, history, temperature, top_p, repetition_penalty, web_search, google_news_rss):
|
801 |
-
answer = ask_question(question, temperature, top_p, repetition_penalty, web_search, google_news_rss)
|
802 |
-
history.append((question, answer))
|
803 |
-
return "", history
|
804 |
-
|
805 |
-
submit_button.click(chat, inputs=[question_input, chatbot, temperature_slider, top_p_slider, repetition_penalty_slider, web_search_checkbox, google_news_rss_checkbox], outputs=[question_input, chatbot])
|
806 |
|
807 |
extract_button = gr.Button("Extract Database to Excel")
|
808 |
excel_output = gr.File(label="Download Excel File")
|
|
|
779 |
web_search_checkbox = gr.Checkbox(label="Enable Web Search", value=False)
|
780 |
google_news_rss_checkbox = gr.Checkbox(label="Google News RSS", value=False)
|
781 |
|
782 |
+
def chat(question, history, temperature, top_p, repetition_penalty, web_search, google_news_rss):
|
783 |
+
answer = ask_question(question, temperature, top_p, repetition_penalty, web_search, google_news_rss)
|
784 |
+
history.append((question, answer))
|
785 |
+
return "", history
|
786 |
+
|
787 |
+
submit_button.click(chat, inputs=[question_input, chatbot, temperature_slider, top_p_slider, repetition_penalty_slider, web_search_checkbox, google_news_rss_checkbox], outputs=[question_input, chatbot])
|
788 |
+
|
789 |
with gr.Row():
|
790 |
bank_dropdown = gr.Dropdown(
|
791 |
choices=list(website_configs.keys()),
|
|
|
804 |
outputs=news_fetch_output
|
805 |
)
|
806 |
|
|
|
|
|
|
|
|
|
|
|
|
|
807 |
|
808 |
extract_button = gr.Button("Extract Database to Excel")
|
809 |
excel_output = gr.File(label="Download Excel File")
|