Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| import subprocess | |
| import directories as Dir | |
| import process as ps | |
| def HCR(im): | |
| ps.textDetection(im) | |
| ps.textRearrange() | |
| ps.textRecognition() | |
| hcr = ps.getHcrResult(Dir.txt_file_path) | |
| subprocess.call('cd'+ Dir.yolo_dir, shell=True) | |
| #clearDir() | |
| return hcr | |
| title = "HCR" | |
| description = "[Postech X KITA] Elite Undergradute AI Strategy Program | AI Project Competition Team 2 OCR Part" | |
| article = "<p style='text-align: center'> Handwritten Text Character Recognition Task " \ | |
| "Text Detection + Text Rearrangement + Text Recognition" \ | |
| "For More Information" \ | |
| "<a href='https://bandalcom.github.io/'>GitBlog</a> |" \ | |
| "<a href='https://github.com/bandalcom/Postech+KITA_AI-Project'>Source code</a></p>" | |
| #<a href='https://github.com/bandalcom/Postech+KITA_AI-Project'>Source code</a> | |
| #examples = [['zidane.jpg'], ['bus.jpg']] | |
| #examples=examples, | |
| gr.Interface(fn=HCR, inputs="image", outputs = "text", title=title, description=description, article=article, analytics_enabled=False).launch( | |
| debug=True) |