Spaces:
Sleeping
Sleeping
Dawoodthouseef
commited on
Commit
•
6383ae5
1
Parent(s):
06cf128
Update app.py
Browse files
app.py
CHANGED
@@ -32,10 +32,11 @@ conversation_history = []
|
|
32 |
# Prediction function
|
33 |
def predict(message, system_prompt='', temperature=0.7, max_new_tokens=4096,Topp=0.5,Repetitionpenalty=1.2):
|
34 |
global conversation_history
|
35 |
-
|
|
|
36 |
# Append the user's input to the conversation history
|
37 |
conversation_history.append({"role": "system", "content": input_text})
|
38 |
-
response_text = model(ins.format(question)
|
39 |
conversation_history.append({"role": "user", "content": input_text})
|
40 |
conversation_history.append({"role": "assistant", "content": response_text})
|
41 |
return response_text
|
|
|
32 |
# Prediction function
|
33 |
def predict(message, system_prompt='', temperature=0.7, max_new_tokens=4096,Topp=0.5,Repetitionpenalty=1.2):
|
34 |
global conversation_history
|
35 |
+
question=message
|
36 |
+
input_text=ins
|
37 |
# Append the user's input to the conversation history
|
38 |
conversation_history.append({"role": "system", "content": input_text})
|
39 |
+
response_text = model(ins.format(question))
|
40 |
conversation_history.append({"role": "user", "content": input_text})
|
41 |
conversation_history.append({"role": "assistant", "content": response_text})
|
42 |
return response_text
|