kodetr commited on
Commit
a988545
·
verified ·
1 Parent(s): 45a7998

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +2 -19
src/streamlit_app.py CHANGED
@@ -167,25 +167,8 @@ elif choose == "CNN":
167
  st.write("Aplikasi ini menggunakan model CNN untuk mengklasifikasikan data bandwidth menjadi Fake, Genuine, atau No Heavy Activity")
168
 
169
  # Upload file
170
- training_file = st.file_uploader("Upload Data Training (.txt)", type=["txt"],accept_multiple_files=True)
171
- real_files = st.file_uploader("Upload Data Real (.txt)", type=["txt"], accept_multiple_files=True)
172
-
173
- if training_file:
174
- if training_file.size > 50 * 1024 * 1024: # Batasi ukuran file <= 50MB
175
- st.error("Ukuran file training melebihi 50MB!")
176
- else:
177
- content = training_file.read().decode("utf-8")
178
- st.write("File training berhasil diupload ✅")
179
- st.code(f"100 karakter pertama:\n{content[:100]}")
180
-
181
- if real_files:
182
- for file in real_files:
183
- if file.size > 50 * 1024 * 1024:
184
- st.error(f"File {file.name} melebihi 50MB!")
185
- else:
186
- content = file.read().decode("utf-8")
187
- st.write(f"File {file.name} berhasil diupload ✅")
188
- st.code(f"100 karakter pertama:\n{content[:100]}")
189
 
190
  # Parameter model
191
  epochs = st.number_input("Jumlah Epoch", min_value=1, value=2000)
 
167
  st.write("Aplikasi ini menggunakan model CNN untuk mengklasifikasikan data bandwidth menjadi Fake, Genuine, atau No Heavy Activity")
168
 
169
  # Upload file
170
+ training_file = st.file_uploader("Upload Data Training (.txt)", accept_multiple_files=True)
171
+ real_files = st.file_uploader("Upload Data Real (.txt)", accept_multiple_files=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
172
 
173
  # Parameter model
174
  epochs = st.number_input("Jumlah Epoch", min_value=1, value=2000)