Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import os
|
|
5 |
import json
|
6 |
import random
|
7 |
import gradio as gr
|
|
|
8 |
import torch
|
9 |
import torch.nn as nn
|
10 |
import torch.optim as optim
|
@@ -136,8 +137,7 @@ 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):
|
@@ -287,4 +287,4 @@ iface = gr.Interface(
|
|
287 |
]
|
288 |
)
|
289 |
|
290 |
-
iface.launch()
|
|
|
5 |
import json
|
6 |
import random
|
7 |
import gradio as gr
|
8 |
+
import gradio.components
|
9 |
import torch
|
10 |
import torch.nn as nn
|
11 |
import torch.optim as optim
|
|
|
137 |
default_percentage = total_percentage / len(emotions)
|
138 |
for emotion in emotions:
|
139 |
emotions[emotion]['percentage'] = default_percentage
|
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):
|
|
|
287 |
]
|
288 |
)
|
289 |
|
290 |
+
iface.launch()
|