not-lain commited on
Commit
d9542eb
·
verified ·
1 Parent(s): 9b25d4e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -2,13 +2,11 @@
2
  import gradio as gr
3
  from transformers import pipeline
4
 
5
- pipe = pipeline("text2text-generation", model="google/flan-t5-base")
6
 
7
  # a function that uses the pipeline
8
  # takes text as input and passes it to the pipeline
9
  def chat(text):
10
- output = pipe(text)[0]["generated_text"]
11
- return output
12
  # fucntion , input of type text , output of type text
13
  demo = gr.Interface(chat , "text" , "text" )
14
  demo.launch()
 
2
  import gradio as gr
3
  from transformers import pipeline
4
 
 
5
 
6
  # a function that uses the pipeline
7
  # takes text as input and passes it to the pipeline
8
  def chat(text):
9
+ return text
 
10
  # fucntion , input of type text , output of type text
11
  demo = gr.Interface(chat , "text" , "text" )
12
  demo.launch()