Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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-
|
5 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("merve/chatgpt-
|
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()
|