adrianizq commited on
Commit
3663525
1 Parent(s): e17887e

Add application changes4

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -2,9 +2,15 @@
2
  import gradio as gr
3
  from fastai.vision.all import *
4
 
 
 
 
 
5
  # Cargar el modelo Fastai previamente entrenado
6
- model_path = 'https://huggingface.co/adrianizq/model/blob/main/model.pkl'
7
- learn = load_learner(model_path)
 
 
8
 
9
  # Función para realizar predicciones en una imagen
10
  def predict_image(input_image):
 
2
  import gradio as gr
3
  from fastai.vision.all import *
4
 
5
+ from transformers import AutoModelForSequenceClassification
6
+
7
+ model = AutoModelForSequenceClassification.from_pretrained("adrianizq/model")
8
+
9
  # Cargar el modelo Fastai previamente entrenado
10
+ #model_path = 'https://huggingface.co/adrianizq/model/blob/main/model.pkl'
11
+ #learn = load_learner(model_path)
12
+ learn = load_learner(model)
13
+
14
 
15
  # Función para realizar predicciones en una imagen
16
  def predict_image(input_image):