Spaces:
Runtime error
Runtime error
File size: 551 Bytes
1b86088 97f5aa3 1b86088 97f5aa3 1b86088 97f5aa3 1b86088 97f5aa3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
from aitextgen import aitextgen
ai = aitextgen(model="EleutherAI/gpt-neo-125M",to_gpu=False)
def ai_text(inp):
generated_text = ai.generate_one(max_length = 1000, prompt = inp, no_repeat_ngram_size = 3) #repetition_penalty = 1.9)
#print(type(generated_text))
return generated_text
output_text = gr.outputs.Textbox()
iface = gr.Interface(ai_text,"textbox", output_text, title="ai generated Blog with GPT-Neo",
description="AI Generated Blog Content with GPT-Neo - via {aitextgen}")
iface.launch() |