Update app.py
Browse files
app.py
CHANGED
@@ -53,11 +53,11 @@ def process_text(text_input, unit):
|
|
53 |
system=f"You are a experienced {unit} doctor AI assistant." + SYS_PROMPT,
|
54 |
api_name="/model_chat"
|
55 |
)
|
56 |
-
while
|
57 |
time.sleep(0.1)
|
58 |
-
response = job.
|
59 |
print(response)
|
60 |
-
return response[-1][
|
61 |
|
62 |
def process_image(image_input, unit):
|
63 |
if image_input is not None:
|
@@ -76,10 +76,10 @@ def process_image(image_input, unit):
|
|
76 |
)
|
77 |
print(res5)
|
78 |
|
79 |
-
with open(
|
80 |
data = json.load(f)
|
81 |
data['name'] = ABS_URL + image
|
82 |
-
with open(
|
83 |
json.dump(data, f, indent=4)
|
84 |
|
85 |
job = client.submit(
|
|
|
53 |
system=f"You are a experienced {unit} doctor AI assistant." + SYS_PROMPT,
|
54 |
api_name="/model_chat"
|
55 |
)
|
56 |
+
while job.done():
|
57 |
time.sleep(0.1)
|
58 |
+
response = job.result()
|
59 |
print(response)
|
60 |
+
return response[-1][1][1][1]
|
61 |
|
62 |
def process_image(image_input, unit):
|
63 |
if image_input is not None:
|
|
|
76 |
)
|
77 |
print(res5)
|
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 |
|
85 |
job = client.submit(
|