Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def process_text(text_input, unit):
|
|
57 |
time.sleep(0.1)
|
58 |
response = job.result()
|
59 |
print(response)
|
60 |
-
return response[-1][1][
|
61 |
|
62 |
def process_image(image_input, unit):
|
63 |
if image_input is not None:
|
@@ -78,7 +78,7 @@ def process_image(image_input, unit):
|
|
78 |
|
79 |
with open(res5, 'r') as f:
|
80 |
data = json.load(f)
|
81 |
-
data['name'] = ABS_URL + image
|
82 |
with open(res5, 'w') as f:
|
83 |
json.dump(data, f, indent=4)
|
84 |
|
|
|
57 |
time.sleep(0.1)
|
58 |
response = job.result()
|
59 |
print(response)
|
60 |
+
return response[-1][1][0][1]
|
61 |
|
62 |
def process_image(image_input, unit):
|
63 |
if image_input is not None:
|
|
|
78 |
|
79 |
with open(res5, 'r') as f:
|
80 |
data = json.load(f)
|
81 |
+
data[0][0]['name'] = ABS_URL + image
|
82 |
with open(res5, 'w') as f:
|
83 |
json.dump(data, f, indent=4)
|
84 |
|