Spaces:
Sleeping
Sleeping
File size: 590 Bytes
fe3f85c 2556944 f72dedb fe3f85c ec716b2 331dc69 2556944 f72dedb 2556944 fe3f85c f72dedb 3124816 3537b2b 3124816 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
from transformers import pipeline
import gradio as gr
# pipe_flan = pipeline("text2text-generation", model="google/flan-t5-small")
# def pred(input):
# output = pipe_flan(input)
# return output[0]["generated_text"]
def test_fun(input):
return input
demo = gr.Blocks()
with demo:
with gr.Row():
input_text = gr.Textbox(label='Input Text',lines=5)
b1 = gr.Button('Submit')
output_text = gr.Textbox()
b1.click(fn = test_fun, inputs=input_text, outputs= output_text)
if __name__=='__main__':
demo.launch()
# if __name__=='__main__'
|