Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from transformers import pipeline | |
| model_path = 'gopanda/sentiment-finetune' | |
| sentiment_pipeline = pipeline("sentiment-analysis", model=model_path, tokenizer=model_path) | |
| def predict(input_img): | |
| predictions = sentiment_pipeline(input_img) | |
| return predictions | |
| gradio_app = gr.Interface( | |
| predict, | |
| ) | |
| if __name__ == "__main__": | |
| gradio_app.launch() | |