orrinin commited on
Commit
8300a2c
·
verified ·
1 Parent(s): 20f7f32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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 not job.done():
57
  time.sleep(0.1)
58
- response = job.outputs()
59
  print(response)
60
- return response[-1][0][0]
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('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(
 
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(