DarwinAnim8or commited on
Commit
f915829
1 Parent(s): 48328b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -2,10 +2,10 @@ import gradio as gr
2
 
3
  from happytransformer import HappyGeneration
4
 
5
- happy_gen = HappyGeneration("GPT-NEO", "DarwinAnim8or/GPT-Greentext-355m")
6
 
7
  from happytransformer import GENSettings
8
- args_top_k = GENSettings(no_repeat_ngram_size=3, do_sample=True, top_k=80, temperature=0.7, max_length=150, early_stopping=False)
9
 
10
  def generate(text):
11
  inputText = "Write a greentext from 4chan.org. The story should be like a bullet-point list using > as the start of each line. Most greentexts are humorous or absurd in nature. Most greentexts have a twist near the end.\n"
@@ -31,7 +31,9 @@ demo = gr.Interface(
31
  fn=generate,
32
  inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
33
  outputs=gr.outputs.Textbox(label="Generated Text"),
34
- examples=examples
 
 
35
  )
36
 
37
  demo.launch()
 
2
 
3
  from happytransformer import HappyGeneration
4
 
5
+ happy_gen = HappyGeneration("GPT2", "DarwinAnim8or/GPT-Greentext-355m")
6
 
7
  from happytransformer import GENSettings
8
+ args_top_k = GENSettings(no_repeat_ngram_size=3, do_sample=True, top_k=80, temperature=0.8, max_length=150, early_stopping=False)
9
 
10
  def generate(text):
11
  inputText = "Write a greentext from 4chan.org. The story should be like a bullet-point list using > as the start of each line. Most greentexts are humorous or absurd in nature. Most greentexts have a twist near the end.\n"
 
31
  fn=generate,
32
  inputs=gr.inputs.Textbox(lines=5, label="Input Text"),
33
  outputs=gr.outputs.Textbox(label="Generated Text"),
34
+ examples=examples,
35
+ title="GPT-Greentext Playground",
36
+ description="Using the 355m size model. You may need to run it a few times in order to get something good!"
37
  )
38
 
39
  demo.launch()