Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -308,7 +308,7 @@ def handle_image_message(event):
|
|
| 308 |
prompt = (
|
| 309 |
f"我提供了三件上衣圖片和三件下半身圖片,以及使用者的一張個人照片。使用者資訊:身高 {user_info['height']}cm,三圍 {user_info['bust']}-{user_info['waist']}-{user_info['hip']},場合是「{occasion}」。"
|
| 310 |
"請根據這些衣物,為我推薦一套最適合的穿搭,並詳細說明為何這套搭配適合這個場合。請以繁體中文回答。"
|
| 311 |
-
"
|
| 312 |
)
|
| 313 |
|
| 314 |
all_images_base64 = (
|
|
@@ -420,5 +420,6 @@ def handle_image_message(event):
|
|
| 420 |
reply_token,
|
| 421 |
TextSendMessage(text=f"圖片處理失敗,請稍後再試。錯誤:{e}")
|
| 422 |
)
|
|
|
|
| 423 |
if __name__ == "__main__":
|
| 424 |
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", 8080)))
|
|
|
|
| 308 |
prompt = (
|
| 309 |
f"我提供了三件上衣圖片和三件下半身圖片,以及使用者的一張個人照片。使用者資訊:身高 {user_info['height']}cm,三圍 {user_info['bust']}-{user_info['waist']}-{user_info['hip']},場合是「{occasion}」。"
|
| 310 |
"請根據這些衣物,為我推薦一套最適合的穿搭,並詳細說明為何這套搭配適合這個場合。請以繁體中文回答。"
|
| 311 |
+
"請在描述中以圖片連結的形式(例如:'https://example.com/outfit1.jpg')顯示你搭配好的衣物組合。"
|
| 312 |
)
|
| 313 |
|
| 314 |
all_images_base64 = (
|
|
|
|
| 420 |
reply_token,
|
| 421 |
TextSendMessage(text=f"圖片處理失敗,請稍後再試。錯誤:{e}")
|
| 422 |
)
|
| 423 |
+
|
| 424 |
if __name__ == "__main__":
|
| 425 |
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", 8080)))
|