Spaces:
Runtime error
Runtime error
#level 1 text generator | |
import gradio as gr | |
examples = [ | |
["Once upon a time, "], | |
["One day, "] | |
] | |
gr.load("huggingface/bigscience/bloom-560m", title='My Second Text Generator', examples=examples).launch() | |
#import gradio as gr | |
#from transformers import pipeline | |
#generator = pipeline('text-generation', model='EleutherAI/gpt-neo-1.3B') | |
#def generate(text): | |
# result=generator(text, max_length=100, num_return_sequences=3) | |
# return result[0]['generated_text'] | |
#gr.Interface(fn=generate, inputs=gr.inputs.Textbox(lines=5, label='input text'), outputs=gr.outputs.Textbox(label='output text'), title='My First Text Generator', examples=examples).launch() |