Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -64,9 +64,10 @@ def generate_natural_language_description(tags, api_key=None):
|
|
64 |
"content": f"Here are the tags: {tags}\nPlease generate a vivid, imaginative scene description.",
|
65 |
},
|
66 |
],
|
67 |
-
model="gpt-
|
68 |
)
|
69 |
-
|
|
|
70 |
except Exception as e:
|
71 |
return f"GPT generation failed. Error: {e}"
|
72 |
|
|
|
64 |
"content": f"Here are the tags: {tags}\nPlease generate a vivid, imaginative scene description.",
|
65 |
},
|
66 |
],
|
67 |
+
model="gpt-4o",
|
68 |
)
|
69 |
+
# 通过属性访问 response 内容
|
70 |
+
return response.choices[0].message["content"].strip()
|
71 |
except Exception as e:
|
72 |
return f"GPT generation failed. Error: {e}"
|
73 |
|