aliicemill commited on
Commit
0221b4a
·
verified ·
1 Parent(s): e23e3c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -12
app.py CHANGED
@@ -11,17 +11,6 @@ st.title("Note Analyzer Streamlit Uygulaması")
11
  if "show_images" not in st.session_state:
12
  st.session_state.show_images = True # Varsayılan olarak resimler gösterilsin
13
 
14
- # Uygulamanın çalışma prensibini açıklayan resimler
15
- if st.session_state.show_images:
16
- st.subheader("Uygulamanın Çalışma Prensibi")
17
-
18
- # Resimlerin dosya isimlerini sırayla listele
19
- image_files = ["turkish/a.png", "turkish/b.png", "turkish/c.png", "turkish/d.png"]
20
-
21
- # Resimleri alt alta ekle
22
- for image_file in image_files:
23
- st.image(image_file, use_container_width=True) # Yeni parametre kullanıldı
24
-
25
  # Kullanıcıdan veri alma (Sidebar sabit kalıyor)
26
  st.sidebar.header("Girdi Alanları")
27
 
@@ -52,7 +41,19 @@ if st.sidebar.button("Analizi Çalıştır"):
52
  # Butona basıldığında resimleri gizle
53
  st.session_state.show_images = False
54
 
55
- # Notları yükleme ve işleme
 
 
 
 
 
 
 
 
 
 
 
 
56
  if input_method == "Dosya Yükle" and uploaded_file is None:
57
  st.error("Lütfen bir dosya yükleyin!")
58
  elif input_method == "Kopyala-Yapıştır" and not text_input:
 
11
  if "show_images" not in st.session_state:
12
  st.session_state.show_images = True # Varsayılan olarak resimler gösterilsin
13
 
 
 
 
 
 
 
 
 
 
 
 
14
  # Kullanıcıdan veri alma (Sidebar sabit kalıyor)
15
  st.sidebar.header("Girdi Alanları")
16
 
 
41
  # Butona basıldığında resimleri gizle
42
  st.session_state.show_images = False
43
 
44
+ # Resimler yalnızca show_images True ise gösterilir
45
+ if st.session_state.show_images:
46
+ st.subheader("Uygulamanın Çalışma Prensibi")
47
+
48
+ # Resimlerin dosya isimlerini sırayla listele
49
+ image_files = ["turkish/a.png", "turkish/b.png", "turkish/c.png", "turkish/d.png"]
50
+
51
+ # Resimleri alt alta ekle
52
+ for image_file in image_files:
53
+ st.image(image_file, use_container_width=True)
54
+
55
+ # Notları yükleme ve işleme işlemleri (Butona basıldıysa çalışır)
56
+ if not st.session_state.show_images:
57
  if input_method == "Dosya Yükle" and uploaded_file is None:
58
  st.error("Lütfen bir dosya yükleyin!")
59
  elif input_method == "Kopyala-Yapıştır" and not text_input: