Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from aitextgen import aitextgen | |
| # Downloading gpt neo from hugging face model hub | |
| ai= aitextgen(model='EleutherAI/gpt-neo-125M', to_gpu=False) | |
| def ai_text(Input): | |
| # returning text as string for gradio | |
| generated_text= ai.generate_one(max_length=1000, prompt=Input, no_repeat_ngram_size=3) | |
| print(generated_text) | |
| return generated_text | |
| output_text=gr.outputs.Textbox() | |
| gr.Interface(ai_text, "textbox", | |
| output_text, title="Centauri Pilot", | |
| examples= [ | |
| ['Chocolate gives bad skin'], | |
| ['India has the highest population'], | |
| ['The moon is not a planet'], | |
| ['Who is Alexander the Great?']], | |
| theme='dark-peach', | |
| description="V1 of Generating Blog Content using GPT-Neo by implementing aitextgen and Gradio").launch(inline=False) |