Update app.py
Browse files
app.py
CHANGED
@@ -156,4 +156,11 @@ with gr.Blocks(css="textarea, .gr-box { font-size: 18px !important; }") as demo:
|
|
156 |
outputs=[question_display_2, audio_input_2, transcribed_text_2,
|
157 |
context_analysis_result, confidence_analysis_result])
|
158 |
|
159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
outputs=[question_display_2, audio_input_2, transcribed_text_2,
|
157 |
context_analysis_result, confidence_analysis_result])
|
158 |
|
159 |
+
if __name__ == "__main__":
|
160 |
+
import os
|
161 |
+
|
162 |
+
# Force disable API mode specifically for Hugging Face Spaces
|
163 |
+
if "SPACE_ID" in os.environ:
|
164 |
+
demo.launch(share=False, show_api=False, api_mode=False)
|
165 |
+
else:
|
166 |
+
demo.launch(share=True, show_api=False)
|