Update app.py
Browse files
app.py
CHANGED
@@ -85,10 +85,10 @@ def vanilla_chatbot(message, history):
|
|
85 |
context = "Context:\n"
|
86 |
for i in range(len(response.source_nodes)):
|
87 |
context = context + response.source_nodes[i].text + "\n\n"
|
88 |
-
|
89 |
prompt = prompt_template_w_context(context, message)
|
90 |
inputs = tokenizer(prompt, return_tensors="pt")
|
91 |
-
outputs = model.generate(input_ids=inputs["input_ids"], max_new_tokens=
|
92 |
#print(tokenizer.batch_decode(outputs)[0])
|
93 |
#conversation = pipe(message, temperature=0.1)
|
94 |
ot=tokenizer.batch_decode(outputs)[0]
|
|
|
85 |
context = "Context:\n"
|
86 |
for i in range(len(response.source_nodes)):
|
87 |
context = context + response.source_nodes[i].text + "\n\n"
|
88 |
+
print(context)
|
89 |
prompt = prompt_template_w_context(context, message)
|
90 |
inputs = tokenizer(prompt, return_tensors="pt")
|
91 |
+
outputs = model.generate(input_ids=inputs["input_ids"], max_new_tokens=100)
|
92 |
#print(tokenizer.batch_decode(outputs)[0])
|
93 |
#conversation = pipe(message, temperature=0.1)
|
94 |
ot=tokenizer.batch_decode(outputs)[0]
|