Update app.py
Browse files
app.py
CHANGED
@@ -44,10 +44,11 @@ def translator_text(text, src_lang):
|
|
44 |
return translation[0]['translation_text']
|
45 |
|
46 |
|
47 |
-
# Take the
|
48 |
-
def
|
49 |
-
|
50 |
-
|
|
|
51 |
|
52 |
|
53 |
def main(date, src_lang, text):
|
|
|
44 |
return translation[0]['translation_text']
|
45 |
|
46 |
|
47 |
+
# Take all the inputs from the user, including the mood (result from the classifier), and append them to the DataFrame.
|
48 |
+
def appender(date, text, mood):
|
49 |
+
global df
|
50 |
+
new_row = pd.DataFrame({'Date': [date], 'Text': [text], 'Mood': [mood]})
|
51 |
+
df = pd.concat([df, new_row], ignore_index=True)
|
52 |
|
53 |
|
54 |
def main(date, src_lang, text):
|