Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Hugging Face Spaces entry point for Classics RAG QA.
|
| 3 |
+
|
| 4 |
+
This file is the entry point for Hugging Face Spaces deployment.
|
| 5 |
+
It imports and launches the Gradio app from src/app.py.
|
| 6 |
+
"""
|
| 7 |
+
from src.app import launch_app
|
| 8 |
+
|
| 9 |
+
# Launch the app with paths relative to project root
|
| 10 |
+
# HF Spaces runs from the repository root
|
| 11 |
+
demo = launch_app(
|
| 12 |
+
config_path="configs/app.yaml",
|
| 13 |
+
index_dir="data/index"
|
| 14 |
+
)
|
| 15 |
+
|
| 16 |
+
# For HF Spaces, we need to expose the interface
|
| 17 |
+
# The interface will be automatically detected by HF Spaces
|
| 18 |
+
if __name__ == "__main__":
|
| 19 |
+
demo.launch()
|
| 20 |
+
|