Update app.py
Browse files
app.py
CHANGED
@@ -81,8 +81,6 @@ def save_session_state_data(session_state_data, filename):
|
|
81 |
writer.writeheader()
|
82 |
writer.writerow(session_state_data)
|
83 |
|
84 |
-
return pd.DataFrame(session_state_data)
|
85 |
-
|
86 |
def deepcut_tokenizer(text,sensitive_words=sensitive_words):
|
87 |
cleanedText = "".join([i for i in text if i not in string.punctuation]).lower()
|
88 |
cleanedText = normalize(unicodedata.normalize('NFKD', cleanedText).replace('\n','').replace('\r','').replace('\t','').replace('“','').replace('”','').replace('.','').replace('–','').replace('‘','').replace('’','').replace('ํา','ำ').replace('...','').replace(',','').replace( 'ี','ี'))
|
@@ -332,7 +330,7 @@ def main():
|
|
332 |
st.session_state.string_contain_df = st.session_state.string_contain_df.to_dict(orient='records')
|
333 |
|
334 |
try:
|
335 |
-
|
336 |
|
337 |
except:
|
338 |
#database insertion
|
|
|
81 |
writer.writeheader()
|
82 |
writer.writerow(session_state_data)
|
83 |
|
|
|
|
|
84 |
def deepcut_tokenizer(text,sensitive_words=sensitive_words):
|
85 |
cleanedText = "".join([i for i in text if i not in string.punctuation]).lower()
|
86 |
cleanedText = normalize(unicodedata.normalize('NFKD', cleanedText).replace('\n','').replace('\r','').replace('\t','').replace('“','').replace('”','').replace('.','').replace('–','').replace('‘','').replace('’','').replace('ํา','ำ').replace('...','').replace(',','').replace( 'ี','ี'))
|
|
|
330 |
st.session_state.string_contain_df = st.session_state.string_contain_df.to_dict(orient='records')
|
331 |
|
332 |
try:
|
333 |
+
save_session_state_data(st.session_state.to_dict(), 'satisfaction.csv')
|
334 |
|
335 |
except:
|
336 |
#database insertion
|