Spaces:
Build error
Build error
Update app.py
Browse files516 unmodified lines51751851952052152252319 unmodified lines543544545546547548549516 unmodified linesstop_event.clear()print(user_question)if future and not future.done():return "A query is already being processed. Please stop it before starting a new one."print(user_question)# Start the processing in a new threadfuture = executor.submit(answer_question_thread, user_question, chatbot)19 unmodified lineschatbot.append((user_question1, response_text1))return gr.update(value=chatbot)except Exception as e:return [(f"Error occurred: {e}", "bot")]def stop_processing(chatbot):516 unmodified lines51751851952052152252352452519 unmodified lines545546547548549550551552553516 unmodified linesstop_event.clear()print(user_question)if future and not future.done():chatbot.append(("","A query is already being processed. Please stop it before starting a new one."))return gr.update(value=chatbot)print(user_question)# Start the processing in a new threadfuture = executor.submit(answer_question_thread, user_question, chatbot)19 unmodified lineschatbot.append((user_question1, response_text1))return gr.update(value=chatbot)except Exception as e:print [(f"Error occurred: {e}", "")]chatbot.append((user_question, "Sorry, we encountered an error while processing your request. Please try after some time."))return gr.update(value=chatbot)def stop_processing(chatbot):
app.py+6-2