Update app.py
Browse files
app.py
CHANGED
@@ -43,6 +43,10 @@ answer_span = inputs["input_ids"][0][start_idx:end_idx]
|
|
43 |
answer = tokenizer.decode(answer_span)
|
44 |
|
45 |
try:
|
46 |
-
|
|
|
|
|
|
|
|
|
47 |
except:
|
48 |
-
st.write('
|
|
|
43 |
answer = tokenizer.decode(answer_span)
|
44 |
|
45 |
try:
|
46 |
+
if len(question) >5:
|
47 |
+
st.write(f"Answer: {answer}")
|
48 |
+
else:
|
49 |
+
st.write('Please ask a longer question about the Amazon')
|
50 |
+
|
51 |
except:
|
52 |
+
st.write('There has been an error')
|