Spaces:
Runtime error
Runtime error
File size: 663 Bytes
9aaeb64 7681358 3e5ffb2 72d3f9e 9aaeb64 72d3f9e 9aaeb64 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
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() |