orrinin commited on
Commit
1402965
·
verified ·
1 Parent(s): ecdf02d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -48,7 +48,7 @@ def process_text(text_input, unit):
48
  job = client.submit(
49
  query=str(text_input),
50
  history=None,
51
- system=f"You are a experienced {unit} doctor AI assistant." + SYS_PROMPT,
52
  api_name="/model_chat"
53
  )
54
  response = job.result(timeout=60)
@@ -64,8 +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
- response = client.predict(
 
 
 
 
 
 
 
68
  image,
 
 
 
 
 
69
  prompt,
70
  fn_index=0
71
  )
 
48
  job = client.submit(
49
  query=str(text_input),
50
  history=None,
51
+ #system=f"You are a experienced {unit} doctor AI assistant." + SYS_PROMPT,
52
  api_name="/model_chat"
53
  )
54
  response = job.result(timeout=60)
 
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(res1)
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
  )