Shanat commited on
Commit
3051fc5
1 Parent(s): 9e234e6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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
- #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=280)
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]