Spaces:
Sleeping
Sleeping
refactor (app): new directory structure
Browse files- Dockerfile +1 -1
- evaluate.csv → app/evaluate.csv +0 -0
- factory_predictor.py → app/factory_predictor.py +0 -0
- server_factory_predictor.py → app/server_factory_predictor.py +1 -1
- {static → app/static}/editor/index.html +2 -2
- {static → app/static}/editor/js/editor-pg.js +0 -0
- {static → app/static}/editor/js/editor-rest.js +0 -0
- {static → app/static}/gallery/factory-ai.html +0 -0
- test.csv → app/test.csv +0 -0
- train.csv → app/train.csv +0 -0
Dockerfile
CHANGED
|
@@ -9,5 +9,5 @@ WORKDIR /app
|
|
| 9 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 10 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 11 |
|
| 12 |
-
COPY --chown=user
|
| 13 |
CMD ["uvicorn", "server_factory_predictor:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
| 9 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 10 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 11 |
|
| 12 |
+
COPY --chown=user ./app /app
|
| 13 |
CMD ["uvicorn", "server_factory_predictor:app", "--host", "0.0.0.0", "--port", "8000"]
|
evaluate.csv → app/evaluate.csv
RENAMED
|
File without changes
|
factory_predictor.py → app/factory_predictor.py
RENAMED
|
File without changes
|
server_factory_predictor.py → app/server_factory_predictor.py
RENAMED
|
@@ -35,7 +35,7 @@ def root():
|
|
| 35 |
|
| 36 |
@app.get("/editor/")
|
| 37 |
def get_editor():
|
| 38 |
-
return FileResponse(os.path.join("
|
| 39 |
|
| 40 |
def train_model():
|
| 41 |
global training_status
|
|
|
|
| 35 |
|
| 36 |
@app.get("/editor/")
|
| 37 |
def get_editor():
|
| 38 |
+
return FileResponse(os.path.join("static", "editor", "index.html"))
|
| 39 |
|
| 40 |
def train_model():
|
| 41 |
global training_status
|
{static → app/static}/editor/index.html
RENAMED
|
@@ -4,9 +4,9 @@
|
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<title>Playground Editor</title>
|
| 6 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mundorum/collections@0.3.0/full.min.css">
|
| 7 |
-
<script type="module" src="/static/editor/js/editor-rest.js"></script>
|
| 8 |
<script type="module">
|
| 9 |
-
import { EditorPg } from '/static/editor/js/editor-pg.js'
|
| 10 |
window.editorPg = EditorPg.i
|
| 11 |
</script>
|
| 12 |
</head>
|
|
|
|
| 4 |
<meta charset="utf-8">
|
| 5 |
<title>Playground Editor</title>
|
| 6 |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mundorum/collections@0.3.0/full.min.css">
|
| 7 |
+
<script type="module" src="/app/static/editor/js/editor-rest.js"></script>
|
| 8 |
<script type="module">
|
| 9 |
+
import { EditorPg } from '/app/static/editor/js/editor-pg.js'
|
| 10 |
window.editorPg = EditorPg.i
|
| 11 |
</script>
|
| 12 |
</head>
|
{static → app/static}/editor/js/editor-pg.js
RENAMED
|
File without changes
|
{static → app/static}/editor/js/editor-rest.js
RENAMED
|
File without changes
|
{static → app/static}/gallery/factory-ai.html
RENAMED
|
File without changes
|
test.csv → app/test.csv
RENAMED
|
File without changes
|
train.csv → app/train.csv
RENAMED
|
File without changes
|