rongo1 commited on
Commit
d5b9946
·
1 Parent(s): 595f63f

Fix HF Spaces server configuration

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -590,9 +590,13 @@ with gr.Blocks(title="Business Card Data Extractor") as demo:
590
 
591
  if __name__ == "__main__":
592
  logger.info("Starting Gradio demo")
593
- logger.info("Application will be available at http://localhost:7860")
594
  try:
595
- demo.launch()
 
 
 
 
 
596
  except KeyboardInterrupt:
597
  logger.info("Application stopped by user (Ctrl+C)")
598
  except Exception as e:
 
590
 
591
  if __name__ == "__main__":
592
  logger.info("Starting Gradio demo")
 
593
  try:
594
+ # For Hugging Face Spaces compatibility
595
+ demo.launch(
596
+ server_name="0.0.0.0",
597
+ server_port=7860,
598
+ share=False
599
+ )
600
  except KeyboardInterrupt:
601
  logger.info("Application stopped by user (Ctrl+C)")
602
  except Exception as e: