ginipick commited on
Commit
c9c6fdf
·
verified ·
1 Parent(s): 14e03a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -1
app.py CHANGED
@@ -207,7 +207,6 @@ def respond(
207
  response += token.strip("")
208
  yield response
209
 
210
-
211
  def create_ui():
212
  try:
213
  css = """
@@ -383,3 +382,28 @@ def create_ui():
383
  print(f"Error in create_ui: {str(e)}")
384
  print(traceback.format_exc())
385
  raise
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  response += token.strip("")
208
  yield response
209
 
 
210
  def create_ui():
211
  try:
212
  css = """
 
382
  print(f"Error in create_ui: {str(e)}")
383
  print(traceback.format_exc())
384
  raise
385
+
386
+ if __name__ == "__main__":
387
+ try:
388
+ print("Starting HuggingFace Space Analyzer...")
389
+ demo = create_ui()
390
+ print("UI created successfully.")
391
+
392
+ print("Configuring Gradio queue...")
393
+ demo.queue()
394
+ print("Gradio queue configured.")
395
+
396
+ print("Launching Gradio app...")
397
+ demo.launch(
398
+ server_name="0.0.0.0",
399
+ server_port=7860,
400
+ share=False,
401
+ debug=True,
402
+ show_api=False
403
+ )
404
+ print("Gradio app launched successfully.")
405
+ except Exception as e:
406
+ print(f"Error in main: {str(e)}")
407
+ print("Detailed error information:")
408
+ print(traceback.format_exc())
409
+ raise