ECUiVADE commited on
Commit
d19dd62
1 Parent(s): e932844

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -67,14 +67,10 @@ def AIPatient(message):
67
  response = ""
68
  # Here, you should add the code to generate the response using your model
69
  # For example:
70
- while(len(response) < 1):
71
- output = llm(context, max_tokens=400, stop=["Nurse:"], echo=False)
72
- response = output["choices"][0]["text"]
73
- response = response.strip()
74
-
75
- with feedback_file.open("a") as f:
76
- f.write(json.dumps({"Nurse": message, "Barry": response},indent=4))
77
- f.write("\n")
78
 
79
  context += response
80
  print (context)
 
67
  response = ""
68
  # Here, you should add the code to generate the response using your model
69
  # For example:
70
+ for output in llm(input, stream=True, temperature=temperature, top_p=top_p, max_tokens=max_length, ):
71
+ piece = output['choices'][0]['text']
72
+ response += piece
73
+ chatbot[-1] = (chatbot[-1][0], response)
 
 
 
 
74
 
75
  context += response
76
  print (context)