Blog-Generation / app.py
Saurav21's picture
update
9df383c
raw
history blame contribute delete
579 Bytes
import gradio as gr
from aitextgen import aitextgen
def text_gen(text):
model_name = "EleutherAI/gpt-neo-125M"
model = aitextgen(model = model_name)
text_generated = model.generate_one(max_length=1000, prompt = text, no_repeat_ngram_size = 3)
return text_generated
output_text = gr.outputs.Textbox()
gr.Interface(text_gen,
inputs = gr.inputs.Textbox(label = "Input Text"),
outputs = gr.outputs.Textbox(),
title = "Blog Generator using AI",
description = "Create a 1000 word blog on any topic").launch()