Update app.py
Browse files
app.py
CHANGED
|
@@ -78,12 +78,11 @@ async def call_modal_backend(problem_input: str, complexity: int):
|
|
| 78 |
print(f"JSON Decode Error: {e} in line: {line}")
|
| 79 |
current_status = f"Error decoding: {e}"
|
| 80 |
yield (current_status, format_chat_history_for_gradio(full_chat_history), current_solution, current_confidence, current_minority_opinions)
|
| 81 |
-
# Do not return here if you want to keep trying to parse subsequent chunks
|
| 82 |
except Exception as e:
|
| 83 |
print(f"Error processing event: {e}, Data: {data}")
|
| 84 |
current_status = f"An internal error occurred: {e}"
|
| 85 |
yield (current_status, format_chat_history_for_gradio(full_chat_history), current_solution, current_confidence, current_minority_opinions)
|
| 86 |
-
return
|
| 87 |
|
| 88 |
except httpx.HTTPStatusError as e:
|
| 89 |
current_status = f"HTTP Error from Modal backend: {e.response.status_code}"
|
|
|
|
| 78 |
print(f"JSON Decode Error: {e} in line: {line}")
|
| 79 |
current_status = f"Error decoding: {e}"
|
| 80 |
yield (current_status, format_chat_history_for_gradio(full_chat_history), current_solution, current_confidence, current_minority_opinions)
|
|
|
|
| 81 |
except Exception as e:
|
| 82 |
print(f"Error processing event: {e}, Data: {data}")
|
| 83 |
current_status = f"An internal error occurred: {e}"
|
| 84 |
yield (current_status, format_chat_history_for_gradio(full_chat_history), current_solution, current_confidence, current_minority_opinions)
|
| 85 |
+
return
|
| 86 |
|
| 87 |
except httpx.HTTPStatusError as e:
|
| 88 |
current_status = f"HTTP Error from Modal backend: {e.response.status_code}"
|