Spaces:
Sleeping
Sleeping
Update app.py
Browse files14 unmodified lines15161718192021222324252627281 unmodified line303132253334353614 unmodified lines predicted_class = torch.argmax(logits, dim=-1).item() # Get the predicted class labels = ["Negative", "Neutral", "Positive"] # Adjust based on your model's labels return labels[predicted_class]css = body { background-image: url('https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.cardekho.com%2Fkia%2Fcarnival&psig=AOvVaw0gJ-OuvTNRMOejPCpZbXvN&ust=1733533986628000&source=images&cd=vfe&opi=89978449&ved=0CBQQjRxqFwoTCPDU4sP7kYoDFQAAAAAdAAAAABAE'); /* Replace with your image URL */ background-size: cover; background-repeat: no-repeat; background-attachment: fixed;}
# Set up Gradio interfaceinterface = gr.Interface(1 unmodified line inputs=gr.Textbox(lines=2, placeholder="Enter text to classify..."), outputs=gr.Textbox(label="Predicted Sentiment"), title="Sentiment Classifier", description="Enter a piece of text and let the model classify it as Negative, Neutral, or Positive." description="Enter a piece of car review and let the model classify it as Negative, Neutral, or Positive.")
# Launch the appapp.py+9-1