Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| def greet(name): | |
| if name =="earth quake": | |
| return "" + name + " is a disaster" | |
| elif name =="game": | |
| return "" + name + " is not a disaster" | |
| elif name =="heavy rain": | |
| return "" + name + " is a disaster!" | |
| else: | |
| return "" + name + " is a disaster" | |
| title = "DISASTER ANALYSIS OF TWEETS" | |
| desc = "A rapid NLP model for evaluating crisis-related tweets, aiding quick response and situational awareness" | |
| demo = gr.Interface(fn=greet, inputs= gr.Textbox(label="TWEET", placeholder="PLEASE ENTER YOUR TWEET HERE"), | |
| outputs = gr.Textbox(label="PREDICTED OUTPUT", placeholder="DISASTER/NOT"),title=title, | |
| description=desc) | |
| demo.launch(inline=False) |