kodetr commited on
Commit
fa7b530
·
verified ·
1 Parent(s): 87e22c1

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +11 -0
src/streamlit_app.py CHANGED
@@ -171,6 +171,17 @@ elif choose == "CNN":
171
  training_file = st.file_uploader("Upload Data Training (.txt)", type=["txt"])
172
  real_files = st.file_uploader("Upload Data Real (.txt)", type=["txt"], accept_multiple_files=True)
173
 
 
 
 
 
 
 
 
 
 
 
 
174
  # Parameter model
175
  epochs = st.number_input("Jumlah Epoch", min_value=1, value=2000)
176
  batch_size = st.number_input("Ukuran Batch", min_value=1, value=32)
 
171
  training_file = st.file_uploader("Upload Data Training (.txt)", type=["txt"])
172
  real_files = st.file_uploader("Upload Data Real (.txt)", type=["txt"], accept_multiple_files=True)
173
 
174
+ if training_file is not None:
175
+ # Proses file training langsung dari memori
176
+ training_content = training_file.read().decode("utf-8")
177
+ st.write("Training file content:", training_content[:100]) # Contoh
178
+
179
+ if real_files:
180
+ for file in real_files:
181
+ # Proses setiap file real langsung dari memori
182
+ real_content = file.read().decode("utf-8")
183
+ st.write(f"Content dari {file.name}:", real_content[:100])
184
+
185
  # Parameter model
186
  epochs = st.number_input("Jumlah Epoch", min_value=1, value=2000)
187
  batch_size = st.number_input("Ukuran Batch", min_value=1, value=32)