arg / app.py
isaiah08's picture
Create app.py
e263007
raw
history blame
343 Bytes
import gradio as gr
from transformers import pipeline
import tensorflow
text2text_generator = pipeline("text2text-generation")
def main(input):
return text2text_generator("question: " + input + " context: 42 is the answer to life, the universe and everything")
iface = gr.Interface(fn=main, inputs="text", outputs="text")
iface.launch()