dammy commited on
Commit
53446f8
·
1 Parent(s): 112cf87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -37,14 +37,11 @@ def local_query(query, context):
37
  Question: {}
38
  """.format(context, query)
39
 
40
- print('t5 query is')
41
- print(t5query)
42
-
43
  inputs = tokenizer(t5query, return_tensors="pt")
44
 
45
- print('done with tokenizer')
46
  outputs = model.generate(**inputs, max_new_tokens=20)
47
-
48
  return tokenizer.batch_decode(outputs, skip_special_tokens=True)
49
 
50
  def run_query(file, history, query):
@@ -81,10 +78,12 @@ def run_query(file, history, query):
81
  print(context)
82
  print('calling local query')
83
  result = local_query(query, context)
 
84
  print(result)
85
 
86
  history = history.append(result)
87
 
 
88
  print(history)
89
  return history, result
90
 
 
37
  Question: {}
38
  """.format(context, query)
39
 
 
 
 
40
  inputs = tokenizer(t5query, return_tensors="pt")
41
 
42
+ print('entering model generator')
43
  outputs = model.generate(**inputs, max_new_tokens=20)
44
+ print(f'output is outputs')
45
  return tokenizer.batch_decode(outputs, skip_special_tokens=True)
46
 
47
  def run_query(file, history, query):
 
78
  print(context)
79
  print('calling local query')
80
  result = local_query(query, context)
81
+ print('printing result after call back')
82
  print(result)
83
 
84
  history = history.append(result)
85
 
86
+ print('printing history')
87
  print(history)
88
  return history, result
89