Spaces:
Runtime error
Runtime error
nyonyong
commited on
Commit
•
58c6ff9
1
Parent(s):
018bdc6
Dir fix
Browse files
app.py
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
import subprocess
|
3 |
-
|
4 |
import directories as Dir
|
5 |
import process as ps
|
6 |
|
|
|
|
|
7 |
|
8 |
def HCR(im):
|
9 |
ps.textDetection(im)
|
@@ -25,7 +27,7 @@ article = "<p style='text-align: center'> Handwritten Text Character Recognition
|
|
25 |
|
26 |
#<a href='https://github.com/bandalcom/Postech+KITA_AI-Project'>Source code</a>
|
27 |
#examples = [['zidane.jpg'], ['bus.jpg']]
|
28 |
-
examples = ['
|
29 |
#examples=examples,
|
30 |
gr.Interface(fn=HCR, inputs="image", outputs = "text", title=title, description=description, examples=examples, article=article, analytics_enabled=False).launch(
|
31 |
debug=True)
|
|
|
1 |
import gradio as gr
|
2 |
import subprocess
|
3 |
+
import torch
|
4 |
import directories as Dir
|
5 |
import process as ps
|
6 |
|
7 |
+
torch.hub.download_url_to_file('https://huggingface.co/spaces/Nebulae000/NoteCrawling/blob/main/noteimg1.jpg', 'noteimg1.jpg')
|
8 |
+
#torch.hub.download_url_to_file('https://github.com/ultralytics/yolov5/raw/master/data/images/bus.jpg', 'bus.jpg')
|
9 |
|
10 |
def HCR(im):
|
11 |
ps.textDetection(im)
|
|
|
27 |
|
28 |
#<a href='https://github.com/bandalcom/Postech+KITA_AI-Project'>Source code</a>
|
29 |
#examples = [['zidane.jpg'], ['bus.jpg']]
|
30 |
+
examples = ['noteimg1.jpg']
|
31 |
#examples=examples,
|
32 |
gr.Interface(fn=HCR, inputs="image", outputs = "text", title=title, description=description, examples=examples, article=article, analytics_enabled=False).launch(
|
33 |
debug=True)
|