Spaces:
Runtime error
Runtime error
nyonyong
commited on
Commit
·
1454a03
1
Parent(s):
c638079
Dir fix
Browse files
app.py
CHANGED
|
@@ -4,8 +4,7 @@ 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/
|
| 8 |
-
torch.hub.download_url_to_file('https://huggingface.co/spaces/Nebulae000/NoteCrawling/blob/main/noteimg2.jpg', 'noteimg2.jpg')
|
| 9 |
|
| 10 |
def HCR(im):
|
| 11 |
ps.textDetection(im)
|
|
@@ -27,7 +26,8 @@ article = "<p style='text-align: center'> Handwritten Text Character Recognition
|
|
| 27 |
|
| 28 |
#<a href='https://github.com/bandalcom/Postech+KITA_AI-Project'>Source code</a>
|
| 29 |
#examples = [['zidane.jpg'], ['bus.jpg']]
|
| 30 |
-
|
|
|
|
| 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)
|
|
|
|
| 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/noteimg2.jpg', 'noteimg2.jpg')
|
|
|
|
| 8 |
|
| 9 |
def HCR(im):
|
| 10 |
ps.textDetection(im)
|
|
|
|
| 26 |
|
| 27 |
#<a href='https://github.com/bandalcom/Postech+KITA_AI-Project'>Source code</a>
|
| 28 |
#examples = [['zidane.jpg'], ['bus.jpg']]
|
| 29 |
+
torch.hub.download_url_to_file('https://ibb.co/JyMt31q', 'noteimg1.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)
|