Spaces:
Runtime error
Runtime error
from aitextgen import aitextgen | |
import gradio as gr | |
ai=aitextgen(model='EleutherAI/gpt-neo-125M',to_gpu=False) # EleutherAI/gpt-neo-2.7B EleutherAI/gpt-neo-1.3B | |
def ai_text(Input): | |
generated_text = ai.generate_one(max_length = 500, prompt = Input, no_repeat_ngram_size = 3) #repetition_penalty = 1.9) | |
#print(type(generated_text)) | |
return generated_text | |
title_ = "Text Generator GPT-Neo-125M" | |
description_ = "Kindly input text, submit, and the computer will predict subsequent words for your text input." | |
output_text = gr.outputs.Textbox() | |
iface=gr.Interface(ai_text,"textbox", output_text, title=title_,description=description_)#.launch() | |
iface.launch() |