Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,12 +12,10 @@ history = []
|
|
| 12 |
|
| 13 |
def generate_text(input_text, history):
|
| 14 |
print("history ",history)
|
| 15 |
-
print("input ",
|
| 16 |
-
print("last history: ", history[-1])
|
| 17 |
full_conversation = f"{history} Q: {input_text} \n A:"
|
| 18 |
print("full convo", full_conversation)
|
| 19 |
-
|
| 20 |
-
print("temp convo", temp_conversation)
|
| 21 |
output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
|
| 22 |
response = output['choices'][0]['text']
|
| 23 |
return response
|
|
|
|
| 12 |
|
| 13 |
def generate_text(input_text, history):
|
| 14 |
print("history ",history)
|
| 15 |
+
print("input ", input_text)
|
|
|
|
| 16 |
full_conversation = f"{history} Q: {input_text} \n A:"
|
| 17 |
print("full convo", full_conversation)
|
| 18 |
+
|
|
|
|
| 19 |
output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
|
| 20 |
response = output['choices'][0]['text']
|
| 21 |
return response
|