Sephfox commited on
Commit
a7b534c
·
verified ·
1 Parent(s): b6382cd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -135,7 +135,9 @@ emotions = {
135
  total_percentage = 200
136
  default_percentage = total_percentage / len(emotions)
137
  for emotion in emotions:
138
- emotions[emotion]['emotion_history_file = 'emotion_history.json'
 
 
139
 
140
  def load_historical_data(file_path=emotion_history_file):
141
  if os.path.exists(file_path):
@@ -287,7 +289,7 @@ def process_input(text):
287
  'predicted_emotion': predicted_emotion,
288
  'sentiment_score': sentiment_score,
289
  'bloom_generated_text': bloom_generated_text,
290
- 'gpt_generated_text': gpt_generated_text
291
  })
292
  save_historical_data(historical_data)
293
 
 
135
  total_percentage = 200
136
  default_percentage = total_percentage / len(emotions)
137
  for emotion in emotions:
138
+ emotions[emotion]['percentage'] = default_percentage
139
+
140
+ emotion_history_file = 'emotion_history.json'
141
 
142
  def load_historical_data(file_path=emotion_history_file):
143
  if os.path.exists(file_path):
 
289
  'predicted_emotion': predicted_emotion,
290
  'sentiment_score': sentiment_score,
291
  'bloom_generated_text': bloom_generated_text,
292
+ 'gpt_generated_text': gpt_generated_text
293
  })
294
  save_historical_data(historical_data)
295