DmitryRyumin commited on
Commit
eac013f
β€’
1 Parent(s): 2b57c64
Files changed (5) hide show
  1. README.md +1 -1
  2. app/event_handlers/submit.py +2 -2
  3. app/plots.py +4 -2
  4. config.toml +1 -1
  5. requirements.txt +3 -3
README.md CHANGED
@@ -5,7 +5,7 @@ colorFrom: blue
5
  colorTo: pink
6
  sdk: gradio
7
  python_version: 3.12.7
8
- sdk_version: 5.4.0
9
  app_file: app.py
10
  app_port: 7860
11
  header: default
 
5
  colorTo: pink
6
  sdk: gradio
7
  python_version: 3.12.7
8
+ sdk_version: 5.5.0
9
  app_file: app.py
10
  app_port: 7860
11
  header: default
app/event_handlers/submit.py CHANGED
@@ -172,7 +172,7 @@ def event_handler_submit(
172
  list(config_data.General_DICT_EMO),
173
  (12, 2.5),
174
  [i + 1 for i in frame_indices],
175
- 2,
176
  )
177
  plt_sent = plot_predictions(
178
  df_pred,
@@ -181,7 +181,7 @@ def event_handler_submit(
181
  list(config_data.General_DICT_SENT),
182
  (12, 1.5),
183
  [i + 1 for i in frame_indices],
184
- 2,
185
  )
186
 
187
  return (
 
172
  list(config_data.General_DICT_EMO),
173
  (12, 2.5),
174
  [i + 1 for i in frame_indices],
175
+ 3,
176
  )
177
  plt_sent = plot_predictions(
178
  df_pred,
 
181
  list(config_data.General_DICT_SENT),
182
  (12, 1.5),
183
  [i + 1 for i in frame_indices],
184
+ 3,
185
  )
186
 
187
  return (
app/plots.py CHANGED
@@ -58,14 +58,16 @@ def plot_predictions(
58
  ) -> None:
59
  fig, ax = plt.subplots(figsize=figsize)
60
 
 
 
61
  ax.plot(df.index, df[column], linestyle="dotted", linewidth=line_width)
62
  ax.set_title(title)
63
  ax.set_xlabel("Frames")
64
  ax.set_ylabel(title)
65
 
66
  ax.set_xticks(x_ticks)
67
- ax.set_yticks(range(len(y_labels)))
68
- ax.set_yticklabels(y_labels)
69
 
70
  ax.grid(True)
71
  fig.tight_layout()
 
58
  ) -> None:
59
  fig, ax = plt.subplots(figsize=figsize)
60
 
61
+ df[column] += 1
62
+
63
  ax.plot(df.index, df[column], linestyle="dotted", linewidth=line_width)
64
  ax.set_title(title)
65
  ax.set_xlabel("Frames")
66
  ax.set_ylabel(title)
67
 
68
  ax.set_xticks(x_ticks)
69
+ ax.set_yticks(range(len(y_labels) + 2))
70
+ ax.set_yticklabels([" "] + y_labels + [" "])
71
 
72
  ax.grid(True)
73
  fig.tight_layout()
config.toml CHANGED
@@ -1,5 +1,5 @@
1
  [AppSettings]
2
- APP_VERSION = "0.0.1"
3
  CSS_PATH = "app.css"
4
 
5
  [General]
 
1
  [AppSettings]
2
+ APP_VERSION = "0.0.2"
3
  CSS_PATH = "app.css"
4
 
5
  [General]
requirements.txt CHANGED
@@ -1,13 +1,13 @@
1
- gradio==5.4.0
2
  gradio_client==1.4.2
3
  spaces==0.30.4
4
  polars==1.12.0
5
  torch==2.2.2
6
  torchaudio==2.2.2
7
  opencv-contrib-python==4.10.0.84
8
- ultralytics==8.3.26
9
  lapx==0.5.11
10
- transformers==4.46.1
11
  pillow==11.0.0
12
  pandas==2.2.3
13
  numpy==1.26.4
 
1
+ gradio==5.5.0
2
  gradio_client==1.4.2
3
  spaces==0.30.4
4
  polars==1.12.0
5
  torch==2.2.2
6
  torchaudio==2.2.2
7
  opencv-contrib-python==4.10.0.84
8
+ ultralytics==8.3.27
9
  lapx==0.5.11
10
+ transformers==4.46.2
11
  pillow==11.0.0
12
  pandas==2.2.3
13
  numpy==1.26.4