Spaces:
Sleeping
Sleeping
pragnakalp
commited on
Commit
•
45996a4
1
Parent(s):
ba52c7e
Update app.py
Browse files
app.py
CHANGED
@@ -103,10 +103,7 @@ Generate OCR
|
|
103 |
def generate_ocr(Method,img):
|
104 |
try:
|
105 |
text_output = ''
|
106 |
-
url = 'https://pragnakalpdev33.pythonanywhere.com/HF_space_image_to_text'
|
107 |
-
myobj = {'Deep': 'Mistry'}
|
108 |
|
109 |
-
x = requests.post(url, data = myobj)
|
110 |
print("Method___________________",Method)
|
111 |
if Method == 'EasyOCR':
|
112 |
text_output = ocr_withreadme.txt_easy(img)
|
@@ -129,6 +126,7 @@ def generate_ocr(Method,img):
|
|
129 |
Save generated details
|
130 |
"""
|
131 |
def save_details(Method,text_output,img):
|
|
|
132 |
hostname = get_device_ip_address()
|
133 |
url = 'https://pragnakalpdev33.pythonanywhere.com/HF_space_image_to_text'
|
134 |
myobj = {'Method': Method,'text_output':text_output,'img':img,'hostname':hostname}
|
|
|
103 |
def generate_ocr(Method,img):
|
104 |
try:
|
105 |
text_output = ''
|
|
|
|
|
106 |
|
|
|
107 |
print("Method___________________",Method)
|
108 |
if Method == 'EasyOCR':
|
109 |
text_output = ocr_withreadme.txt_easy(img)
|
|
|
126 |
Save generated details
|
127 |
"""
|
128 |
def save_details(Method,text_output,img):
|
129 |
+
print(img)
|
130 |
hostname = get_device_ip_address()
|
131 |
url = 'https://pragnakalpdev33.pythonanywhere.com/HF_space_image_to_text'
|
132 |
myobj = {'Method': Method,'text_output':text_output,'img':img,'hostname':hostname}
|