Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -632,7 +632,7 @@ setInterval(tick, 500);
|
|
| 632 |
# HF Spaces sets SPACE_ID environment variable
|
| 633 |
is_hf_space = os.environ.get("SPACE_ID") is not None
|
| 634 |
|
| 635 |
-
with gr.Blocks(
|
| 636 |
gr.Markdown("### SmartDoc AI - Document Q&A", elem_classes="app-title")
|
| 637 |
gr.Markdown("Upload your documents and ask questions. Answers will appear below, just like a chat.", elem_classes="app-description")
|
| 638 |
gr.Markdown("---")
|
|
@@ -1069,14 +1069,14 @@ setInterval(tick, 500);
|
|
| 1069 |
if is_hf_space:
|
| 1070 |
# Hugging Face Spaces configuration
|
| 1071 |
logger.info("Running on Hugging Face Spaces")
|
| 1072 |
-
demo.launch(server_name="0.0.0.0", server_port=7860, css=css, js=js)
|
| 1073 |
else:
|
| 1074 |
# Local development configuration
|
| 1075 |
configured_port = int(os.environ.get("GRADIO_SERVER_PORT", "7860"))
|
| 1076 |
server_port = _find_open_port(configured_port)
|
| 1077 |
logger.info(f"Launching Gradio on port {server_port}")
|
| 1078 |
logger.info(f"Access the app at: http://127.0.0.1:{server_port}")
|
| 1079 |
-
demo.launch(server_port=server_port, share=False, css=css, js=js)
|
| 1080 |
|
| 1081 |
|
| 1082 |
if __name__ == "__main__":
|
|
|
|
| 632 |
# HF Spaces sets SPACE_ID environment variable
|
| 633 |
is_hf_space = os.environ.get("SPACE_ID") is not None
|
| 634 |
|
| 635 |
+
with gr.Blocks(title="SmartDoc AI") as demo:
|
| 636 |
gr.Markdown("### SmartDoc AI - Document Q&A", elem_classes="app-title")
|
| 637 |
gr.Markdown("Upload your documents and ask questions. Answers will appear below, just like a chat.", elem_classes="app-description")
|
| 638 |
gr.Markdown("---")
|
|
|
|
| 1069 |
if is_hf_space:
|
| 1070 |
# Hugging Face Spaces configuration
|
| 1071 |
logger.info("Running on Hugging Face Spaces")
|
| 1072 |
+
demo.launch(theme=gr.themes.Soft(),server_name="0.0.0.0", server_port=7860, css=css, js=js)
|
| 1073 |
else:
|
| 1074 |
# Local development configuration
|
| 1075 |
configured_port = int(os.environ.get("GRADIO_SERVER_PORT", "7860"))
|
| 1076 |
server_port = _find_open_port(configured_port)
|
| 1077 |
logger.info(f"Launching Gradio on port {server_port}")
|
| 1078 |
logger.info(f"Access the app at: http://127.0.0.1:{server_port}")
|
| 1079 |
+
demo.launch(theme=gr.themes.Soft(),server_port=server_port, share=False, css=css, js=js)
|
| 1080 |
|
| 1081 |
|
| 1082 |
if __name__ == "__main__":
|