File size: 349 Bytes
2b75707 7a09717 0e72c55 2b75707 bad45ef 0e72c55 2b75707 0e72c55 2b75707 7a09717 2b75707 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import gradio as gr
# Use a pipeline as a high-level helper
from transformers import pipeline, set_seed
pipe = pipeline("text-generation", model="Narsil/gpt3", trust_remote_code=True)
set_seed(42)
def greet(name):
return pipe(name)[0]['generated_text']
# greet('df')
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch() |