orrinin commited on
Commit
3dc387b
·
verified ·
1 Parent(s): 77c8d5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -45,11 +45,10 @@ def process_text(text_input, unit):
45
  client = Client(client_chat)
46
  response = client.predict(
47
  query=text_input,
48
- history=[],
49
  system = f" You are a experienced {unit} doctor AI assistant." + SYS_PROMPT,
50
  api_name="/model_chat"
51
  )
52
- return response
53
 
54
 
55
  def encode_image_to_base64(image_input):
@@ -67,9 +66,9 @@ def process_image(image_input, unit):
67
  # base64_image = encode_image_to_base64(image_input)
68
  prompt = f" You are a experienced {unit} doctor AI assistant." + SYS_PROMPT + "Help me understand what is in this picture and analysis."
69
  response = client.predict(
70
- prompt,
71
  image_input,
72
- fn_index=5
 
73
  )
74
  return response
75
 
 
45
  client = Client(client_chat)
46
  response = client.predict(
47
  query=text_input,
 
48
  system = f" You are a experienced {unit} doctor AI assistant." + SYS_PROMPT,
49
  api_name="/model_chat"
50
  )
51
+ return response[1]
52
 
53
 
54
  def encode_image_to_base64(image_input):
 
66
  # base64_image = encode_image_to_base64(image_input)
67
  prompt = f" You are a experienced {unit} doctor AI assistant." + SYS_PROMPT + "Help me understand what is in this picture and analysis."
68
  response = client.predict(
 
69
  image_input,
70
+ prompt,
71
+ fn_index=0
72
  )
73
  return response
74