Spaces:
Build error
Build error
Beracles
commited on
Commit
·
c49509f
1
Parent(s):
3e648d1
fix
Browse files- Dockerfile +0 -2
- app/watermelon.py +4 -2
Dockerfile
CHANGED
|
@@ -12,6 +12,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
| 12 |
|
| 13 |
COPY . .
|
| 14 |
|
| 15 |
-
USER root
|
| 16 |
-
|
| 17 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 12 |
|
| 13 |
COPY . .
|
| 14 |
|
|
|
|
|
|
|
| 15 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
app/watermelon.py
CHANGED
|
@@ -8,6 +8,7 @@ from huggingface_hub import HfApi
|
|
| 8 |
import os
|
| 9 |
import json
|
| 10 |
|
|
|
|
| 11 |
router = APIRouter(
|
| 12 |
prefix="/watermelon",
|
| 13 |
tags=["watermelon"],
|
|
@@ -37,8 +38,9 @@ def submit(response: Response):
|
|
| 37 |
marker = timestamp+".submit"
|
| 38 |
filepath = "/".join([game, filename])
|
| 39 |
markerpath = "/".join([game, marker])
|
| 40 |
-
|
| 41 |
-
|
|
|
|
| 42 |
with open(filepath, "w") as f:
|
| 43 |
for key in train_generated:
|
| 44 |
myobj = {
|
|
|
|
| 8 |
import os
|
| 9 |
import json
|
| 10 |
|
| 11 |
+
|
| 12 |
router = APIRouter(
|
| 13 |
prefix="/watermelon",
|
| 14 |
tags=["watermelon"],
|
|
|
|
| 38 |
marker = timestamp+".submit"
|
| 39 |
filepath = "/".join([game, filename])
|
| 40 |
markerpath = "/".join([game, marker])
|
| 41 |
+
os.chmod("./",mode=511)
|
| 42 |
+
if not os.path.exists(game):
|
| 43 |
+
os.mkdir(game)
|
| 44 |
with open(filepath, "w") as f:
|
| 45 |
for key in train_generated:
|
| 46 |
myobj = {
|