Spaces:
Runtime error
Runtime error
import joblib | |
import gradio as gr | |
model = joblib.load("model.pkl") | |
def get_sentiment(input_text): | |
return model.predict([input_text][0].capitalize()) | |
iface = gr.Interface( | |
fn=get_sentiment, | |
inputs="text", | |
outputs=["text"], | |
title="Swahili Sentiment Analysis", | |
) | |
iface.launch(inline=False) | |