Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1314,13 +1314,16 @@ def create_interface():
|
|
1314 |
|
1315 |
# Run the app
|
1316 |
if __name__ == "__main__":
|
1317 |
-
#
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
|
|
|
|
|
|
1323 |
|
1324 |
# Create and launch the Gradio interface
|
1325 |
demo = create_interface()
|
1326 |
-
demo.launch(
|
|
|
1314 |
|
1315 |
# Run the app
|
1316 |
if __name__ == "__main__":
|
1317 |
+
# For Hugging Face, use a simpler version without threading
|
1318 |
+
DATA_PATH = os.path.dirname(os.path.abspath(__file__))
|
1319 |
+
|
1320 |
+
print(f"Using data path: {DATA_PATH}")
|
1321 |
+
|
1322 |
+
ONI_DATA_PATH = os.path.join(DATA_PATH, 'oni_data.csv')
|
1323 |
+
TYPHOON_DATA_PATH = os.path.join(DATA_PATH, 'processed_typhoon_data.csv')
|
1324 |
+
LOCAL_iBtrace_PATH = os.path.join(DATA_PATH, 'ibtracs.WP.list.v04r01.csv')
|
1325 |
+
CACHE_FILE = os.path.join(DATA_PATH, 'ibtracs_cache.pkl')
|
1326 |
|
1327 |
# Create and launch the Gradio interface
|
1328 |
demo = create_interface()
|
1329 |
+
demo.launch(share=True) # Use share=True for Hugging Face Spaces
|