Spaces:
Sleeping
Sleeping
Commit
·
db13e94
1
Parent(s):
28ec605
fixed path handling
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import openai
|
|
8 |
import numpy as np
|
9 |
import pickle
|
10 |
from pathlib import Path
|
11 |
-
|
12 |
import umap
|
13 |
import plotly.express as px
|
14 |
import plotly.graph_objects as go
|
|
|
8 |
import numpy as np
|
9 |
import pickle
|
10 |
from pathlib import Path
|
11 |
+
import umap_config
|
12 |
import umap
|
13 |
import plotly.express as px
|
14 |
import plotly.graph_objects as go
|
run.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
import sys
|
3 |
+
|
4 |
+
# Add the application directory to Python path
|
5 |
+
app_dir = os.path.dirname(os.path.abspath(__file__))
|
6 |
+
sys.path.insert(0, app_dir)
|
7 |
+
|
8 |
+
from app import app
|
9 |
+
|
10 |
+
if __name__ == "__main__":
|
11 |
+
# Run the application
|
12 |
+
port = int(os.environ.get("PORT", 7860))
|
13 |
+
app.run(host="0.0.0.0", port=port)
|
wsgi.py
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from app import app
|
2 |
|
3 |
if __name__ == "__main__":
|
|
|
1 |
+
import os
|
2 |
+
import sys
|
3 |
+
|
4 |
+
# Add the current directory to Python path
|
5 |
+
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
6 |
+
|
7 |
from app import app
|
8 |
|
9 |
if __name__ == "__main__":
|