Spaces:
Sleeping
Sleeping
rongo1
commited on
Commit
·
d5b9946
1
Parent(s):
595f63f
Fix HF Spaces server configuration
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
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:
|