Update README.md
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
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:
|