ravinder2024 commited on
Commit
22d74ca
·
verified ·
1 Parent(s): fcf55f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,7 +1,9 @@
1
  import gradio as gr
2
 
3
- if gr.NO_RELOAD:
4
- from transformers import pipeline
5
- pipe = pipeline("text-classification", model="cardiffnlp/twitter-roberta-base-sentiment-latest")
6
 
7
- gr.Interface.from_pipeline(pipe).launch()
 
 
 
 
1
  import gradio as gr
2
 
3
+ hello_world = gr.Interface(lambda name: "Hello " + name, "text", "text")
4
+ bye_world = gr.Interface(lambda name: "Bye " + name, "text", "text")
 
5
 
6
+ demo = gr.TabbedInterface([hello_world, bye_world], ["Hello World", "Bye World"])
7
+
8
+ if __name__ == "__main__":
9
+ demo.launch()