Shahadbal commited on
Commit
e26b867
1 Parent(s): fbdcfcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -44,10 +44,11 @@ def translator_text(text, src_lang):
44
  return translation[0]['translation_text']
45
 
46
 
47
- # Take the text and its source language, translate it to English, so that the classifier can perform the task.
48
- def translator_text(text, src_lang):
49
- translation = translator(text, src_lang=src_lang, tgt_lang="eng_Latn")
50
- return translation[0]['translation_text']
 
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):