Spaces:
Sleeping
Sleeping
import gradio as gr | |
import transformers | |
from transformers import pipeline | |
generator=pipeline('text-generation',model='microsoft/phi-2') | |
def get_textgeneration(text): | |
texte=generator(text) | |
return texte[0]['generated_text'] | |
inter=gr.Interface(get_textgeneration,title='text generator',inputs='text',outputs='text').launch() |