mostrol / app.py
surgery-racoon
init
a54a65e
Raw
History Blame Contribute Delete
366 Bytes
import gradio as gr
from dotenv import load_dotenv
import os
load_dotenv()
# With pipeline, just specify the task and the model id from the Hub.
from transformers import pipeline
pipe = pipeline("text-generation", model="distilgpt2")
def greet(name):
return "Hello " + name + "!!"
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()