Spaces:
Runtime error
Runtime error
import gradio as gr | |
description = "Political tweet classifier" | |
title = "Determine whether a tweet skews Republican or Democratic" | |
examples = [["Team Biden would rather fund the Ayatollah's Death to America regime than allow Americans to produce energy for our own domestic consumption."], | |
["This pandemic has shown us clearly the vulgarity of our healthcare system. Highest costs in the world, yet not enough nurses or doctors. Many millions uninsured, while insurance company profits soar. The struggle continues. Healthcare is a human right. Medicare for all."]] | |
interface = gr.Interface.load("huggingface/m-newhauser/distilbert-political-tweets", | |
description=description, | |
examples=examples, | |
inputs=gr.inputs.Textbox(lines=6, placeholder="Paste a tweet here!"), # the input text box | |
outputs="label", | |
allow_flagging=False, | |
interpretation="shap", | |
num_shap=5 | |
) | |
interface.launch( | |
# auth=("admin", "dachshunds") # adding authentication provides only the public URL | |
) |