NimaKL commited on
Commit
3cdd924
·
1 Parent(s): 9bb8410

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -66,14 +66,15 @@ def make_prediction(model, processed_data, classes=['Alışveriş','Anne-Bebek',
66
 
67
 
68
  if text:
69
- with col1:
70
- st.markdown("<br>", unsafe_allow_html=True)
71
- st.success("Tahmin başarıyla tamamlandı!")
72
- with col2:
73
- with st.spinner('Wait for it...'):
74
- processed_data = prepare_data(text, tokenizer)
75
- result = make_prediction(yorum_model, processed_data=processed_data)
76
- description = '<table style="border: collapse; padding-top: 1px;"><tr><div style="height: 62px;"></div></tr><tr><p style="border-width: medium; border-color: #aa5e70; border-radius: 10px;padding-top: 1px;padding-left: 20px;background:#20212a;font-family:Courier New; color: white;font-size: 36px; font-weight: boldest;">'+result+'</p></tr><table>'
77
- st.markdown(description, unsafe_allow_html=True)
 
78
 
79
 
 
66
 
67
 
68
  if text:
69
+ if text != "":
70
+ with col1:
71
+ st.markdown("<br>", unsafe_allow_html=True)
72
+ st.success("Tahmin başarıyla tamamlandı!")
73
+ with col2:
74
+ with st.spinner('Wait for it...'):
75
+ processed_data = prepare_data(text, tokenizer)
76
+ result = make_prediction(yorum_model, processed_data=processed_data)
77
+ description = '<table style="border: collapse; padding-top: 1px;"><tr><div style="height: 62px;"></div></tr><tr><p style="border-width: medium; border-color: #aa5e70; border-radius: 10px;padding-top: 1px;padding-left: 20px;background:#20212a;font-family:Courier New; color: white;font-size: 36px; font-weight: boldest;">'+result+'</p></tr><table>'
78
+ st.markdown(description, unsafe_allow_html=True)
79
 
80