orrinin commited on
Commit
b5e043e
·
verified ·
1 Parent(s): e0e57d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -11
app.py CHANGED
@@ -50,7 +50,7 @@ def process_text(text_input, unit):
50
  system=f"You are a experienced {unit} doctor AI assistant." + SYS_PROMPT,
51
  api_name="/model_chat"
52
  )
53
- response = job.outputs()
54
  print(response)
55
  return response[1][0][0]
56
 
@@ -61,17 +61,9 @@ def process_image(image_input, unit):
61
  # base64_image = base64.b64encode(f.read()).decode("utf-8")
62
  client = Client(client_vl)
63
  prompt = f" You are a experienced {unit} doctor AI assistant." + SYS_PROMPT + "Help me understand what is in this picture and analysis."
64
- res = client.predict(
65
- history = None,
66
- task_history = None,
67
- file = file(image_input),
68
- fn_index=5
69
- )
70
- print(res)
71
  response = client.predict(
72
- history = [((file.name,))],
73
- task_history = [((file.name,))],
74
- text = prompt,
75
  fn_index=0
76
  )
77
  print(response)
 
50
  system=f"You are a experienced {unit} doctor AI assistant." + SYS_PROMPT,
51
  api_name="/model_chat"
52
  )
53
+ response = job.result()
54
  print(response)
55
  return response[1][0][0]
56
 
 
61
  # base64_image = base64.b64encode(f.read()).decode("utf-8")
62
  client = Client(client_vl)
63
  prompt = f" You are a experienced {unit} doctor AI assistant." + SYS_PROMPT + "Help me understand what is in this picture and analysis."
 
 
 
 
 
 
 
64
  response = client.predict(
65
+ file(image_input),
66
+ prompt,
 
67
  fn_index=0
68
  )
69
  print(response)