Spaces:
Configuration error
Configuration error
jignesh123
commited on
Commit
•
48f7aa8
1
Parent(s):
f065c3a
unchange
Browse files
app.py
CHANGED
@@ -2,16 +2,7 @@ from flask import Flask, render_template, request
|
|
2 |
from model.got_model import perform_ocr # Import the OCR function
|
3 |
import os
|
4 |
import re
|
5 |
-
import gradio as gr
|
6 |
|
7 |
-
def ocr_function(image):
|
8 |
-
# Add your OCR processing code here
|
9 |
-
return "Extracted text from image"
|
10 |
-
|
11 |
-
# Gradio interface setup
|
12 |
-
iface = gr.Interface(fn=ocr_function, inputs="image", outputs="text")
|
13 |
-
iface.launch()
|
14 |
-
app = Flask(__name__)
|
15 |
app.config['UPLOAD_FOLDER'] = 'uploads/'
|
16 |
|
17 |
# Create the uploads folder if it doesn't exist
|
|
|
2 |
from model.got_model import perform_ocr # Import the OCR function
|
3 |
import os
|
4 |
import re
|
|
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
app.config['UPLOAD_FOLDER'] = 'uploads/'
|
7 |
|
8 |
# Create the uploads folder if it doesn't exist
|