Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import base64
|
|
3 |
import gradio as gr
|
4 |
from gradio_client import Client, file
|
5 |
import time
|
|
|
6 |
from gradio import utils
|
7 |
|
8 |
MODEL_NAME = "QWEN"
|
@@ -84,10 +85,15 @@ def process_image(image_input, unit):
|
|
84 |
fn_index=1
|
85 |
)
|
86 |
|
|
|
87 |
response = job.result()
|
88 |
-
|
|
|
|
|
89 |
|
90 |
-
|
|
|
|
|
91 |
|
92 |
def main(text_input="", image_input=None, unit=""):
|
93 |
if text_input and image_input is None:
|
|
|
3 |
import gradio as gr
|
4 |
from gradio_client import Client, file
|
5 |
import time
|
6 |
+
import json
|
7 |
from gradio import utils
|
8 |
|
9 |
MODEL_NAME = "QWEN"
|
|
|
85 |
fn_index=1
|
86 |
)
|
87 |
|
88 |
+
|
89 |
response = job.result()
|
90 |
+
|
91 |
+
with open(response, 'r') as f:
|
92 |
+
data = json.load(f)
|
93 |
|
94 |
+
print(data)
|
95 |
+
|
96 |
+
return data[-1][0]
|
97 |
|
98 |
def main(text_input="", image_input=None, unit=""):
|
99 |
if text_input and image_input is None:
|