Spaces:
Runtime error
Runtime error
Commit
·
6168bbf
1
Parent(s):
6c82cd8
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,12 +10,14 @@ model_path = "models/dreamlike-art/dreamlike-photoreal-2.0"
|
|
| 10 |
model_prefix = "photoreal style"
|
| 11 |
model = gr.Interface.load(model_path)
|
| 12 |
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# Define the OpenAI prompt completion function
|
| 15 |
def generate_text(prompt):
|
| 16 |
response = openai.Completion.create(
|
| 17 |
model= "text-davinci-003",
|
| 18 |
-
prompt=prompt,
|
| 19 |
max_tokens=36,
|
| 20 |
n=1,
|
| 21 |
stop=None,
|
|
|
|
| 10 |
model_prefix = "photoreal style"
|
| 11 |
model = gr.Interface.load(model_path)
|
| 12 |
|
| 13 |
+
base_prompt = "I am a friendly, shy , and excited young girl"
|
| 14 |
+
|
| 15 |
|
| 16 |
# Define the OpenAI prompt completion function
|
| 17 |
def generate_text(prompt):
|
| 18 |
response = openai.Completion.create(
|
| 19 |
model= "text-davinci-003",
|
| 20 |
+
prompt=f"{base_prompt}\n\nQ: {prompt}\nA:",
|
| 21 |
max_tokens=36,
|
| 22 |
n=1,
|
| 23 |
stop=None,
|