mkmenta commited on
Commit
f3f52d2
β€’
1 Parent(s): 4168d97

Add metadata and change prompt

Browse files
Files changed (2) hide show
  1. README.md +8 -2
  2. app.py +8 -2
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
- title: Try Gpt 1 And Gpt 2
3
- emoji: 🌍
4
  colorFrom: indigo
5
  colorTo: red
6
  sdk: gradio
@@ -8,6 +8,12 @@ sdk_version: 3.35.2
8
  app_file: app.py
9
  pinned: false
10
  license: mit
 
 
 
 
 
 
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: Try GPT-1 and GPT-2
3
+ emoji: πŸ¦„
4
  colorFrom: indigo
5
  colorTo: red
6
  sdk: gradio
 
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
+ models:
12
+ - gpt2-xl
13
+ - gpt2-large
14
+ - gpt2-medium
15
+ - gpt-2
16
+ - openai-gpt
17
  ---
18
 
19
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py CHANGED
@@ -46,11 +46,17 @@ def generate(inp, model_name, temperature, top_p, rep_pty, max_length):
46
  return out
47
 
48
 
 
 
 
 
 
 
49
  with gr.Blocks() as demo:
50
- gr.Markdown("# Try GPT-1 and GPT-2")
51
  with gr.Row():
52
  with gr.Column(scale=4):
53
- inp = gr.Textbox(label="Input text:", placeholder="Write something here.", lines=10,)
54
  out = gr.Textbox(label="Generated text:", lines=25)
55
  with gr.Column(scale=1):
56
  with gr.Row(scale=1):
 
46
  return out
47
 
48
 
49
+ SAMPLE_INPUT = (
50
+ "In a shocking finding, scientists discovered a herd of unicorns living in a remote,"
51
+ " previously unexplored valley, in the Andes Mountains. Even more surprising to the"
52
+ " researchers was the fact that the unicorns spoke perfect English."
53
+ )
54
+
55
  with gr.Blocks() as demo:
56
+ gr.Markdown("# πŸ¦„ Try GPT-1 and GPT-2")
57
  with gr.Row():
58
  with gr.Column(scale=4):
59
+ inp = gr.Textbox(label="Input text:", placeholder=SAMPLE_INPUT, lines=10,)
60
  out = gr.Textbox(label="Generated text:", lines=25)
61
  with gr.Column(scale=1):
62
  with gr.Row(scale=1):