bambadij commited on
Commit
95d34f4
1 Parent(s): 83d107d
Files changed (2) hide show
  1. Dockerfile +19 -0
  2. app.py +1 -1
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ WORKDIR /app
4
+
5
+ RUN pip install --upgrade pip
6
+ RUN apt-get update && apt-get install -y \
7
+ tesseract-ocr \
8
+ tesseract-ocr-fra \
9
+ libtesseract-dev \
10
+ && apt-get clean \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ COPY requirements.txt ./
14
+
15
+ RUN pip install --no-cache-dir -r requirements.txt -r requirements.txt
16
+
17
+ COPY ./app.py .
18
+ EXPOSE 7860
19
+ CMD ["python","app.py"]
app.py CHANGED
@@ -100,4 +100,4 @@ with gr.Blocks() as iface:
100
  submit_btn.click(fn=handle_input, inputs=[text_input, image_input, mode], outputs=[output_summary, output_classification])
101
 
102
  if __name__ == "__main__":
103
- iface.launch()
 
100
  submit_btn.click(fn=handle_input, inputs=[text_input, image_input, mode], outputs=[output_summary, output_classification])
101
 
102
  if __name__ == "__main__":
103
+ iface.launch(share=True)