Truong-Phuc Nguyen
commited on
Commit
β’
0ace885
1
Parent(s):
861ecad
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import requests
|
|
6 |
st.set_page_config(page_icon='π', page_title='Text Generation Labeling Tool by n.t.phuc149 π', layout='wide', initial_sidebar_state="collapsed")
|
7 |
# st.markdown("<h1 style='text-align: center;'>Text Generation Labeling Tool</h1>", unsafe_allow_html=True)
|
8 |
|
9 |
-
def file_selector(folder_path=r'./
|
10 |
filenames = os.listdir(folder_path)
|
11 |
return filenames, folder_path
|
12 |
|
@@ -224,7 +224,7 @@ if len(df) != 0:
|
|
224 |
df['d_understanding'][st.session_state.idx] = d_understanding
|
225 |
df['d_difficulty'][st.session_state.idx] = d_difficulty
|
226 |
|
227 |
-
df.to_csv(f'./
|
228 |
st.rerun()
|
229 |
|
230 |
if btn_goto:
|
|
|
6 |
st.set_page_config(page_icon='π', page_title='Text Generation Labeling Tool by n.t.phuc149 π', layout='wide', initial_sidebar_state="collapsed")
|
7 |
# st.markdown("<h1 style='text-align: center;'>Text Generation Labeling Tool</h1>", unsafe_allow_html=True)
|
8 |
|
9 |
+
def file_selector(folder_path=r'./Dataset'):
|
10 |
filenames = os.listdir(folder_path)
|
11 |
return filenames, folder_path
|
12 |
|
|
|
224 |
df['d_understanding'][st.session_state.idx] = d_understanding
|
225 |
df['d_difficulty'][st.session_state.idx] = d_difficulty
|
226 |
|
227 |
+
df.to_csv(f'./Dataset/{filename_input}', index=None, encoding='utf-8-sig')
|
228 |
st.rerun()
|
229 |
|
230 |
if btn_goto:
|