osrojo commited on
Commit
158e1da
verified
1 Parent(s): b0e73a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -11,21 +11,25 @@ import gradio as gr
11
 
12
  # Cargamos el learner
13
 
14
- learner = from_pretrained_fastai('osrojo/learnClass')
15
 
16
 
17
  # Definimos las etiquetas de nuestro modelo
18
 
19
- labels = ['0','1','2','3']
20
 
21
 
22
- example1 = 'shaft abrasions from panties merely shifted to the side'
23
 
24
- example2 = "I'm changing the snowman's into awful looking monsters at night. Its so funny when their owners encounter them and scream!"
25
 
26
- example3 = "Don't be afraid of your fears. Their purpose is not to frighten you, but enlighten you and lead you into a better future."
27
 
28
- example4 = "I've finished reading it; simply mind-blogging. The writer said 'to be continued' but I haven't found part 2."
 
 
 
 
29
 
30
  # Definimos una funci贸n que se encarga de llevar a cabo las predicciones
31
 
@@ -36,4 +40,4 @@ def predict(text):
36
 
37
  # Creamos la interfaz y la lanzamos.
38
 
39
- gr.Interface(fn=predict, inputs=gr.Textbox(), outputs=gr.Label(),examples=[example1,example2,example3,example4]).launch(share=False)
 
11
 
12
  # Cargamos el learner
13
 
14
+ learner = from_pretrained_fastai('osrojo/Emotion')
15
 
16
 
17
  # Definimos las etiquetas de nuestro modelo
18
 
19
+ labels = ['0','1','2','3','4','5']
20
 
21
 
22
+ example1 = "would like to take the opportunity to describe one day this week when i was feeling particularly gloomy"
23
 
24
+ example2 = "i believe that feeling accepted in a non judgemental way can be healing"
25
 
26
+ example3 = "im feeling somewhat nostalgic about the game just from the fact that its star wars"
27
 
28
+ example4 = "i am most certainly an acquired taste but lately many of those around me have seemed to feel the taste to be bitter"
29
+
30
+ example5 = "i feel shy about it all and also a little concerned whether my new title will distance me away from people i care for"
31
+
32
+ example6 = "i feel like they bring the characters to life completely and i m always kind of surprised what the actors do do together"
33
 
34
  # Definimos una funci贸n que se encarga de llevar a cabo las predicciones
35
 
 
40
 
41
  # Creamos la interfaz y la lanzamos.
42
 
43
+ gr.Interface(fn=predict, inputs=gr.Textbox(), outputs=gr.Label(),examples=[example1,example2,example3,example4,example5,emample6]).launch(share=False)