NimaKL commited on
Commit
861a759
·
1 Parent(s): 5d7b21c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -40,7 +40,8 @@ with col1:
40
 
41
 
42
  with col2:
43
- st.title("Sınıfı bulmak için bir şikayet girin./Enter complaint (in Turkish) below to find the class.")
 
44
  #st.subheader("Şikayet")
45
  text = st.text_area("Şikayet / Complaint", "Bebeğim haftada bir kutu mama bitiriyor. Geçen hafta 135 tl'ye aldığım mama bugün 180 tl olmuş. Ben de artık aptamil almayacağım. Tüketici haklarına şikayet etmemiz gerekiyor. Yazıklar olsun.", height=240)
46
  aButton = st.button('Ara')
@@ -65,13 +66,14 @@ def make_prediction(model, processed_data, classes=['Alışveriş','Anne-Bebek',
65
 
66
 
67
  if text or aButton:
68
- with col2:
69
  with st.spinner('Wait for it...'):
70
  processed_data = prepare_data(text, tokenizer)
71
  result = make_prediction(yorum_model, processed_data=processed_data)
 
 
 
72
  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>'
73
  st.markdown(description, unsafe_allow_html=True)
74
- with col1:
75
- st.markdown("<br>", unsafe_allow_html=True)
76
- st.success("Tahmin başarıyla tamamlandı!")
77
 
 
40
 
41
 
42
  with col2:
43
+ st.title("Sınıfı bulmak için bir şikayet girin.")
44
+ st.subheader("Enter complaint (in Turkish) below to find the class.")
45
  #st.subheader("Şikayet")
46
  text = st.text_area("Şikayet / Complaint", "Bebeğim haftada bir kutu mama bitiriyor. Geçen hafta 135 tl'ye aldığım mama bugün 180 tl olmuş. Ben de artık aptamil almayacağım. Tüketici haklarına şikayet etmemiz gerekiyor. Yazıklar olsun.", height=240)
47
  aButton = st.button('Ara')
 
66
 
67
 
68
  if text or aButton:
69
+ with col1:
70
  with st.spinner('Wait for it...'):
71
  processed_data = prepare_data(text, tokenizer)
72
  result = make_prediction(yorum_model, processed_data=processed_data)
73
+ st.markdown("<br>", unsafe_allow_html=True)
74
+ st.success("Tahmin başarıyla tamamlandı!")
75
+ with col2:
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