king007 commited on
Commit
0dcb146
β€’
1 Parent(s): 5f623a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,8 +1,8 @@
1
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
  import gradio as gr
3
 
4
- tokenizer = AutoTokenizer.from_pretrained("merve/chatgpt-prompts-bart-long")
5
- model = AutoModelForSeq2SeqLM.from_pretrained("merve/chatgpt-prompts-bart-long", from_tf=True)
6
 
7
  def generate(prompt):
8
 
@@ -13,6 +13,6 @@ def generate(prompt):
13
 
14
  input_component = gr.Textbox(label = "Input a persona, e.g. photographer", value = "photographer")
15
  output_component = gr.Textbox(label = "Prompt")
16
- examples = []
17
  description = ""
18
- gr.Interface(generate, inputs = input_component, outputs=output_component, examples=examples, title = "ChatGPT Prompt Generator", description=description).launch()
 
1
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
  import gradio as gr
3
 
4
+ tokenizer = AutoTokenizer.from_pretrained("merve/chatgpt-prompt-generator-v12")
5
+ model = AutoModelForSeq2SeqLM.from_pretrained("merve/chatgpt-prompt-generator-v12", from_tf=True)
6
 
7
  def generate(prompt):
8
 
 
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 = ""
18
+ gr.Interface(generate, inputs = input_component, outputs=output_component, examples=examples, title = "πŸ‘¨πŸ»β€πŸŽ€ ChatGPT Prompt Generator v12 πŸ‘¨πŸ»β€πŸŽ€", description=description).launch()