njfamirm commited on
Commit
6bdd4a7
β€’
1 Parent(s): 73a195a

chore: customize

Browse files
Files changed (2) hide show
  1. README.md +6 -8
  2. app.py +4 -4
README.md CHANGED
@@ -1,13 +1,11 @@
1
  ---
2
- title: ChatGPT Prompt Generator
3
- emoji: πŸ‘¨πŸ»β€πŸŽ€
4
- colorFrom: purple
5
- colorTo: pink
6
  sdk: gradio
7
  sdk_version: 3.16.2
8
  app_file: app.py
9
- pinned: false
10
- license: apache-2.0
11
  ---
12
-
13
- Check out the configuration reference at <https://huggingface.co/docs/hub/spaces-config-reference>
 
1
  ---
2
+ title: prompt-generator
3
+ emoji: πŸ€–
4
+ colorFrom: yellow
5
+ colorTo: blue
6
  sdk: gradio
7
  sdk_version: 3.16.2
8
  app_file: app.py
9
+ pinned: true
10
+ license: mit
11
  ---
 
 
app.py CHANGED
@@ -11,8 +11,8 @@ def generate(prompt):
11
  output = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
12
  return output[0]
13
 
14
- input_component = gr.Textbox(label = "Input a persona, e.g. photographer", value = "photographer")
15
  output_component = gr.Textbox(label = "Prompt")
16
- examples = [["photographer"], ["developer"]]
17
- description = "This app generates ChatGPT prompts, it's based on a BART model trained on [this dataset](https://huggingface.co/datasets/fka/awesome-chatgpt-prompts). πŸ““ Simply enter a persona that you want the prompt to be generated based on. πŸ§™πŸ»πŸ§‘πŸ»β€πŸš€πŸ§‘πŸ»β€πŸŽ¨πŸ§‘πŸ»β€πŸ”¬πŸ§‘πŸ»β€πŸ’»πŸ§‘πŸΌβ€πŸ«πŸ§‘πŸ½β€πŸŒΎ"
18
- gr.Interface(generate, inputs = input_component, outputs=output_component, examples=examples, title = "πŸ‘¨πŸ»β€πŸŽ€ ChatGPT Prompt Generator πŸ‘¨πŸ»β€πŸŽ€", description=description).launch()
 
11
  output = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
12
  return output[0]
13
 
14
+ input_component = gr.Textbox(label = "Input a persona, e.g. web developer", value = "prompt generator")
15
  output_component = gr.Textbox(label = "Prompt")
16
+ examples = [["developer"], ["prompt generator"]]
17
+ description = "This app generates ChatGPT prompts, it's based on a BART model trained on [this dataset](https://huggingface.co/datasets/njfamirm/prompt). Simply enter a persona that you want the prompt to be generated based on."
18
+ gr.Interface(generate, inputs = input_component, outputs=output_component, examples=examples, title = "Prompt Generator", description=description).launch()