Update app.py
Browse files
app.py
CHANGED
@@ -58,7 +58,7 @@ def process_text(text_input, unit):
|
|
58 |
)
|
59 |
response = job.result()
|
60 |
local_data.results = response[1][0][1]
|
61 |
-
|
62 |
|
63 |
|
64 |
def process_image(image_input, unit):
|
@@ -105,11 +105,12 @@ def process_image(image_input, unit):
|
|
105 |
|
106 |
def fetch_result():
|
107 |
init_data()
|
108 |
-
return local_data.
|
109 |
|
110 |
def reset_result():
|
111 |
init_data()
|
112 |
-
local_data.
|
|
|
113 |
|
114 |
def main(text_input="", image_input=None, unit=""):
|
115 |
init_data()
|
@@ -118,7 +119,7 @@ def main(text_input="", image_input=None, unit=""):
|
|
118 |
process_text(text_input, unit)
|
119 |
elif image_input is not None:
|
120 |
process_image(image_input, unit)
|
121 |
-
return local_data.
|
122 |
|
123 |
with gr.Blocks(css=css, title="家庭医生AI助手", theme="soft") as iface:
|
124 |
with gr.Accordion(""):
|
|
|
58 |
)
|
59 |
response = job.result()
|
60 |
local_data.results = response[1][0][1]
|
61 |
+
|
62 |
|
63 |
|
64 |
def process_image(image_input, unit):
|
|
|
105 |
|
106 |
def fetch_result():
|
107 |
init_data()
|
108 |
+
return local_data.results
|
109 |
|
110 |
def reset_result():
|
111 |
init_data()
|
112 |
+
print(local_data.results)
|
113 |
+
local_data.results = 0
|
114 |
|
115 |
def main(text_input="", image_input=None, unit=""):
|
116 |
init_data()
|
|
|
119 |
process_text(text_input, unit)
|
120 |
elif image_input is not None:
|
121 |
process_image(image_input, unit)
|
122 |
+
return local_data.results
|
123 |
|
124 |
with gr.Blocks(css=css, title="家庭医生AI助手", theme="soft") as iface:
|
125 |
with gr.Accordion(""):
|