Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -66,10 +66,8 @@ def generate_natural_language_description(tags, api_key=None):
|
|
66 |
],
|
67 |
model="gpt-4o",
|
68 |
)
|
69 |
-
|
70 |
-
|
71 |
-
# 通过属性访问 response 内容
|
72 |
-
return response.choices[0].message["content"].strip()
|
73 |
except Exception as e:
|
74 |
return f"GPT generation failed. Error: {e}"
|
75 |
|
|
|
66 |
],
|
67 |
model="gpt-4o",
|
68 |
)
|
69 |
+
generated_content = response.choices[0].message.content.strip()
|
70 |
+
return generated_content
|
|
|
|
|
71 |
except Exception as e:
|
72 |
return f"GPT generation failed. Error: {e}"
|
73 |
|