Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,19 +101,7 @@ def response_evaluation_for_case_tx(thread_id, query, question_text, input, outp
|
|
| 101 |
|
| 102 |
|
| 103 |
def run_chat_in_all_cases(message, history, question_text,input, output, examples, code_written, thread_id=thread.id):
|
| 104 |
-
|
| 105 |
-
try:
|
| 106 |
-
with open(thread_id_file, 'r') as file:
|
| 107 |
-
existing_thread_id = file.read().strip()
|
| 108 |
-
except FileNotFoundError:
|
| 109 |
-
existing_thread_id = None
|
| 110 |
-
if existing_thread_id:
|
| 111 |
-
thread_id_to_store = existing_thread_id
|
| 112 |
-
else:
|
| 113 |
-
thread_id_to_store = thread_id
|
| 114 |
-
with open(thread_id_file, 'w') as file:
|
| 115 |
-
file.write(thread_id_to_store)
|
| 116 |
-
|
| 117 |
if not message and not code_written:
|
| 118 |
ai_message = opening_statement(thread_id, question_text, input, output, examples)
|
| 119 |
if not code_written:
|
|
@@ -156,4 +144,4 @@ gr.ChatInterface(
|
|
| 156 |
additional_inputs=additional_inputs,
|
| 157 |
title="Mentor Mode",
|
| 158 |
concurrency_limit=20,
|
| 159 |
-
).launch(auth=("issac_user", "hf_198ghgkap34"))
|
|
|
|
| 101 |
|
| 102 |
|
| 103 |
def run_chat_in_all_cases(message, history, question_text,input, output, examples, code_written, thread_id=thread.id):
|
| 104 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
if not message and not code_written:
|
| 106 |
ai_message = opening_statement(thread_id, question_text, input, output, examples)
|
| 107 |
if not code_written:
|
|
|
|
| 144 |
additional_inputs=additional_inputs,
|
| 145 |
title="Mentor Mode",
|
| 146 |
concurrency_limit=20,
|
| 147 |
+
).launch(debug=True, auth=("issac_user", "hf_198ghgkap34"))
|