Spaces:
Running
Running
route
Browse files- Dockerfile +1 -1
- app.py +2 -2
Dockerfile
CHANGED
@@ -27,4 +27,4 @@ COPY --chown=user word_1.jpg $HOME/app
|
|
27 |
RUN paddleocr --image_dir ./word_1.jpg --use_angle_cls true --use_gpu false --lang ch
|
28 |
RUN paddleocr --image_dir ./table.jpg --type=structure --table=true --lang ch
|
29 |
|
30 |
-
CMD ["
|
|
|
27 |
RUN paddleocr --image_dir ./word_1.jpg --use_angle_cls true --use_gpu false --lang ch
|
28 |
RUN paddleocr --image_dir ./table.jpg --type=structure --table=true --lang ch
|
29 |
|
30 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
app.py
CHANGED
@@ -83,7 +83,7 @@ async def create_upload_file(
|
|
83 |
'types': types,
|
84 |
}
|
85 |
|
|
|
86 |
|
87 |
if __name__ == '__main__':
|
88 |
-
|
89 |
-
uvicorn.run(app=app, port=7860)
|
|
|
83 |
'types': types,
|
84 |
}
|
85 |
|
86 |
+
app.mount("/output", StaticFiles(directory="output", follow_symlink=True, html=True), name="output")
|
87 |
|
88 |
if __name__ == '__main__':
|
89 |
+
uvicorn.run(app=app)
|
|