Spaces:
Sleeping
Sleeping
Update routes.py
Browse files
routes.py
CHANGED
@@ -187,13 +187,12 @@ def explain_sentence():
|
|
187 |
)
|
188 |
user_prompt_text = f"방사선 보고서의 이 문장을 설명해주세요: '{selected_sentence}'"
|
189 |
|
|
|
190 |
messages_for_api = [
|
191 |
{"role": "system", "content": system_prompt},
|
192 |
{
|
193 |
"role": "user",
|
194 |
-
"content":
|
195 |
-
{"type": "text", "text": user_prompt_text}
|
196 |
-
]
|
197 |
}
|
198 |
]
|
199 |
|
@@ -301,9 +300,7 @@ def upload_and_analyze():
|
|
301 |
{"role": "system", "content": system_prompt},
|
302 |
{
|
303 |
"role": "user",
|
304 |
-
"content":
|
305 |
-
{"type": "text", "text": user_prompt_text}
|
306 |
-
]
|
307 |
}
|
308 |
]
|
309 |
|
|
|
187 |
)
|
188 |
user_prompt_text = f"방사선 보고서의 이 문장을 설명해주세요: '{selected_sentence}'"
|
189 |
|
190 |
+
# API는 이미지를 직접 받지 못하므로 텍스트만 전송
|
191 |
messages_for_api = [
|
192 |
{"role": "system", "content": system_prompt},
|
193 |
{
|
194 |
"role": "user",
|
195 |
+
"content": user_prompt_text # 텍스트만 전송
|
|
|
|
|
196 |
}
|
197 |
]
|
198 |
|
|
|
300 |
{"role": "system", "content": system_prompt},
|
301 |
{
|
302 |
"role": "user",
|
303 |
+
"content": user_prompt_text # 텍스트만 전송
|
|
|
|
|
304 |
}
|
305 |
]
|
306 |
|