Spaces:
Runtime error
Runtime error
Witold Wydmański
commited on
Commit
·
c914e02
1
Parent(s):
daf6dc3
fix: create `flagged` dir in dockerfile
Browse files- Dockerfile +3 -0
- app.py +0 -1
Dockerfile
CHANGED
|
@@ -11,5 +11,8 @@ RUN pip install -r requirements.txt
|
|
| 11 |
# Copy the source code
|
| 12 |
COPY app.py .
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
# Run the app
|
| 15 |
CMD ["python", "app.py"]
|
|
|
|
| 11 |
# Copy the source code
|
| 12 |
COPY app.py .
|
| 13 |
|
| 14 |
+
RUN mkdir -p flagged
|
| 15 |
+
RUN chmod 777 flagged
|
| 16 |
+
|
| 17 |
# Run the app
|
| 18 |
CMD ["python", "app.py"]
|
app.py
CHANGED
|
@@ -32,7 +32,6 @@ def tesseract_ocr(image, progress=gr.Progress()):
|
|
| 32 |
|
| 33 |
if __name__=="__main__":
|
| 34 |
#make sure that flagged/ dir is created
|
| 35 |
-
os.makedirs("flagged/", exist_ok=True)
|
| 36 |
os.chdir("/code")
|
| 37 |
|
| 38 |
iface = gr.Interface(
|
|
|
|
| 32 |
|
| 33 |
if __name__=="__main__":
|
| 34 |
#make sure that flagged/ dir is created
|
|
|
|
| 35 |
os.chdir("/code")
|
| 36 |
|
| 37 |
iface = gr.Interface(
|