nestorxyz commited on
Commit
25e7e3c
β€’
1 Parent(s): 955819f

add audio and classificator model

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -3,12 +3,15 @@ import requests
3
  from transformers import pipeline
4
  import tensorflow as tf
5
 
6
- inception_net = tf.keras.applications.MobileNetV2()
7
-
8
  # Obteniendo las labels de "https://git.io/JJkYN"
9
  respuesta = requests.get("https://raw.githubusercontent.com/gradio-app/mobilenet-example/master/labels.txt")
10
  etiquetas =respuesta.text.split("\n")
11
 
 
 
 
 
 
12
  def clasifica_imagen(inp):
13
  inp = inp.reshape((-1,224,224,3))
14
  inp = tf.keras.applications.mobilenet_v2.preprocess_input(inp)
 
3
  from transformers import pipeline
4
  import tensorflow as tf
5
 
 
 
6
  # Obteniendo las labels de "https://git.io/JJkYN"
7
  respuesta = requests.get("https://raw.githubusercontent.com/gradio-app/mobilenet-example/master/labels.txt")
8
  etiquetas =respuesta.text.split("\n")
9
 
10
+ # models
11
+ trans = pipeline("automatic-speech-recognition", model = "facebook/wav2vec2-large-xlsr-53-spanish")
12
+ clasificador = pipeline("text-classification", model = "pysentimiento/robertuito-sentiment-analysis")
13
+ inception_net = tf.keras.applications.MobileNetV2()
14
+
15
  def clasifica_imagen(inp):
16
  inp = inp.reshape((-1,224,224,3))
17
  inp = tf.keras.applications.mobilenet_v2.preprocess_input(inp)