Mr-Vicky-01 commited on
Commit
46982d5
·
verified ·
1 Parent(s): fb59825

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -1
README.md CHANGED
@@ -109,7 +109,11 @@ model.to(device)
109
  inputs = inputs.to(device)
110
  outputs = model.generate(**inputs, max_length=256)
111
  answer = tokenizer.decode(outputs[0])
112
- json_data = convert_to_json(answer)
 
 
 
 
113
 
114
  to_return = json_data.copy()
115
  try:
 
109
  inputs = inputs.to(device)
110
  outputs = model.generate(**inputs, max_length=256)
111
  answer = tokenizer.decode(outputs[0])
112
+ try:
113
+ json_data = convert_to_json(answer)
114
+ except:
115
+ json_data = {'message': 'We encountered an issue with your query. Please use the Personalized Scan option for accurate results.'}
116
+ to_return = json_data.copy()
117
 
118
  to_return = json_data.copy()
119
  try: