monipip3 commited on
Commit
7345d04
1 Parent(s): ace6643

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
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
- st.write(f"Answer: {answer}")
 
 
 
 
47
  except:
48
- st.write('Please ask a longer question about the Amazon')
 
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')