File size: 577 Bytes
d0db16c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-1.3B',to_gpu=False)

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_ = "AI Blog Generation 😎"
description_ = " Enter few sentence and it will generate a 500 words blog 🤓"
output_text = gr.outputs.Textbox()
iface=gr.Interface(ai_text,"textbox", output_text, title=title_,description=description_)#.launch()
iface.launch()