RiteshAkhade commited on
Commit
c9900d7
·
verified ·
1 Parent(s): 1170b2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
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
- demo.launch(share=True, show_api = False)
 
 
 
 
 
 
 
 
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)