kovacsvi commited on
Commit
f3c99ea
·
1 Parent(s): a421eff

funding info in footer

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -222,8 +222,9 @@ def predict_wrapper(text, language):
222
  figure = plot_emotion_barplot(prepare_heatmap_data(results_heatmap))
223
  heatmap = plot_emotion_heatmap(prepare_heatmap_data(results_heatmap))
224
  piechart = plot_average_emotion_pie(results_heatmap)
225
- output_info = f'Prediction was made using the <a href="https://huggingface.co/{model_id}">{model_id}</a> model.'
226
- return results, figure, piechart, heatmap, output_info
 
227
 
228
 
229
  with gr.Blocks(css=css) as demo:
@@ -232,7 +233,6 @@ with gr.Blocks(css=css) as demo:
232
  This platform is designed to detect and visualize emotions in text. The model behind it operates using a 6-label codebook, including the following labels: ‘Anger’, ‘Fear’, ‘Disgust’, ‘Sadness’, ‘Joy’, and ‘None of Them’.
233
  The model is optimized for sentence-level analysis, and make predictions in the following languages: Czech, English, French, German, Hungarian, Polish, and Slovak.
234
  The text you enter in the input box is automatically divided into sentences, and the analysis is performed on each sentence. Depending on the length of the text, this process may take a few seconds, but for longer texts, it can take up to 2-3 minutes.
235
- The research was funded by European Union’s Horizon 2020 research and innovation program, “MORES” project (Grant No.: 101132601).
236
  """
237
 
238
  gr.HTML("<h1>MORES Pulse</h1>", elem_classes="title_")
 
222
  figure = plot_emotion_barplot(prepare_heatmap_data(results_heatmap))
223
  heatmap = plot_emotion_heatmap(prepare_heatmap_data(results_heatmap))
224
  piechart = plot_average_emotion_pie(results_heatmap)
225
+ output_info = f'Prediction was made using the <a href="https://huggingface.co/{model_id}">{model_id}</a> model. '
226
+ funding_info = "The research was funded by European Union’s Horizon 2020 research and innovation program, “MORES” project (Grant No.: 101132601)"
227
+ return results, figure, piechart, heatmap, output_info + funding_info
228
 
229
 
230
  with gr.Blocks(css=css) as demo:
 
233
  This platform is designed to detect and visualize emotions in text. The model behind it operates using a 6-label codebook, including the following labels: ‘Anger’, ‘Fear’, ‘Disgust’, ‘Sadness’, ‘Joy’, and ‘None of Them’.
234
  The model is optimized for sentence-level analysis, and make predictions in the following languages: Czech, English, French, German, Hungarian, Polish, and Slovak.
235
  The text you enter in the input box is automatically divided into sentences, and the analysis is performed on each sentence. Depending on the length of the text, this process may take a few seconds, but for longer texts, it can take up to 2-3 minutes.
 
236
  """
237
 
238
  gr.HTML("<h1>MORES Pulse</h1>", elem_classes="title_")