Update app.py
Browse files
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 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
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)
|