acecalisto3 commited on
Commit
857c0ab
1 Parent(s): 2936fbe

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +4 -4
agent.py CHANGED
@@ -181,10 +181,10 @@ def create_interface():
181
  chat_history = gr.Chatbot(label="Chat History")
182
  response_box = gr.Textbox(label="Response")
183
 
184
- stop_scraping_flag = [False]
185
- start_button.click(start_scraping, inputs=[storage_location, urls, scrape_interval, content_type], outputs=csv_output)
186
- stop_button.click(stop_scraping, inputs=[stop_scraping_flag], outputs=[csv_output])
187
- message.submit(respond, inputs=[message, chat_history, system_message, max_tokens, temperature, top_p], outputs=[chat_history, response_box])
188
 
189
  # Add a button to display the CSV content for a selected URL
190
  with gr.Row():
 
181
  chat_history = gr.Chatbot(label="Chat History")
182
  response_box = gr.Textbox(label="Response")
183
 
184
+ # Function to stop scraping
185
+ def stop_scraping(stop_scraping_flag):
186
+ stop_scraping_flag[0] = True
187
+ return "Scraping stopped."
188
 
189
  # Add a button to display the CSV content for a selected URL
190
  with gr.Row():