Update app.py
Browse files
app.py
CHANGED
|
@@ -84,8 +84,11 @@ def process_image(image_input, unit):
|
|
| 84 |
res0,
|
| 85 |
fn_index=1
|
| 86 |
)
|
|
|
|
| 87 |
|
| 88 |
-
|
|
|
|
|
|
|
| 89 |
|
| 90 |
with open(response, 'r') as f:
|
| 91 |
data = json.load(f)
|
|
@@ -93,6 +96,8 @@ def process_image(image_input, unit):
|
|
| 93 |
print(data)
|
| 94 |
|
| 95 |
return data[-1][1]
|
|
|
|
|
|
|
| 96 |
|
| 97 |
def main(text_input="", image_input=None, unit=""):
|
| 98 |
if text_input and image_input is None:
|
|
|
|
| 84 |
res0,
|
| 85 |
fn_index=1
|
| 86 |
)
|
| 87 |
+
|
| 88 |
|
| 89 |
+
while job.done():
|
| 90 |
+
print(job.status())
|
| 91 |
+
response = job.result(timeout=60)
|
| 92 |
|
| 93 |
with open(response, 'r') as f:
|
| 94 |
data = json.load(f)
|
|
|
|
| 96 |
print(data)
|
| 97 |
|
| 98 |
return data[-1][1]
|
| 99 |
+
|
| 100 |
+
def
|
| 101 |
|
| 102 |
def main(text_input="", image_input=None, unit=""):
|
| 103 |
if text_input and image_input is None:
|