Spaces:
Sleeping
Sleeping
updated
Browse files- app.py +6 -1
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -214,4 +214,9 @@ def build_ui():
|
|
| 214 |
|
| 215 |
if __name__ == "__main__":
|
| 216 |
app = build_ui()
|
| 217 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 214 |
|
| 215 |
if __name__ == "__main__":
|
| 216 |
app = build_ui()
|
| 217 |
+
# On Spaces, localhost is blocked; share=True ensures a public link is exposed.
|
| 218 |
+
app.launch(
|
| 219 |
+
server_name="0.0.0.0",
|
| 220 |
+
server_port=int(os.getenv("PORT", "7860")),
|
| 221 |
+
share=os.getenv("SPACE_ID") is not None,
|
| 222 |
+
)
|
requirements.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
gradio
|
| 2 |
huggingface_hub==0.24.6
|
| 3 |
pdfplumber
|
| 4 |
pymupdf
|
|
|
|
| 1 |
+
gradio==4.44.1
|
| 2 |
huggingface_hub==0.24.6
|
| 3 |
pdfplumber
|
| 4 |
pymupdf
|