orrinin commited on
Commit
f2b6def
·
verified ·
1 Parent(s): 83787a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -51,7 +51,7 @@ def process_text(text_input, unit):
51
  system=f"You are a experienced {unit} doctor AI assistant." + SYS_PROMPT,
52
  api_name="/model_chat"
53
  )
54
- response = job.result(timeout=300)
55
  print(response)
56
  return response[1][0][0]
57
 
@@ -64,23 +64,20 @@ def process_image(image_input, unit):
64
  client = Client(client_vl)
65
  print(client.view_api())
66
  prompt = f" You are a experienced {unit} doctor AI assistant." + SYS_PROMPT + "Help me understand what is in this picture and analysis."
67
-
68
- res3 = client.predict(
69
- fn_index = 3
70
- )
71
- print(res3)
72
-
73
  res5 = client.predict(
74
  "",
75
  image,
76
  fn_index=5
77
  )
78
  print(res5)
79
- response = client.predict(
 
80
  res5,
81
  prompt,
82
  fn_index=0
83
  )
 
84
  print(response)
85
  return response[1][0][0]
86
 
 
51
  system=f"You are a experienced {unit} doctor AI assistant." + SYS_PROMPT,
52
  api_name="/model_chat"
53
  )
54
+ response = job.result()
55
  print(response)
56
  return response[1][0][0]
57
 
 
64
  client = Client(client_vl)
65
  print(client.view_api())
66
  prompt = f" You are a experienced {unit} doctor AI assistant." + SYS_PROMPT + "Help me understand what is in this picture and analysis."
67
+
 
 
 
 
 
68
  res5 = client.predict(
69
  "",
70
  image,
71
  fn_index=5
72
  )
73
  print(res5)
74
+
75
+ job = client.submit(
76
  res5,
77
  prompt,
78
  fn_index=0
79
  )
80
+ response = job.result()
81
  print(response)
82
  return response[1][0][0]
83