Spaces:
Paused
Paused
Upload 2 files
Browse files- face_routes.py +1 -1
- secure-pageagent.extend.js +3 -1
face_routes.py
CHANGED
|
@@ -65,7 +65,7 @@ async def _call_vlm(messages, temperature=0.4, max_tokens=4000):
|
|
| 65 |
resp = await client.post(
|
| 66 |
VLM_ENDPOINT,
|
| 67 |
headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
|
| 68 |
-
json={"model": VLM_MODEL, "messages": messages, "temperature": temperature, "max_tokens": max_tokens}
|
| 69 |
)
|
| 70 |
if resp.status_code != 200:
|
| 71 |
err_body = resp.text[:300]
|
|
|
|
| 65 |
resp = await client.post(
|
| 66 |
VLM_ENDPOINT,
|
| 67 |
headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
|
| 68 |
+
json={"model": VLM_MODEL, "messages": messages, "temperature": temperature, "max_tokens": min(max_tokens, 4096), "top_p": 1, "top_k": 40, "presence_penalty": 0, "frequency_penalty": 0}
|
| 69 |
)
|
| 70 |
if resp.status_code != 200:
|
| 71 |
err_body = resp.text[:300]
|
secure-pageagent.extend.js
CHANGED
|
@@ -2190,7 +2190,9 @@ function renderFace(){
|
|
| 2190 |
fetch(BASE+'/api/imagine-edit',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({prompt:prompt,image_url:_fcData.img}),mode:'cors'}).then(function(r){return r.json();}).then(function(d){
|
| 2191 |
btn.disabled=false;btn.innerHTML='🏥 시뮬레이션 시작';
|
| 2192 |
if(d.error){res.innerHTML='<p style="color:#e11d48;font-size:11px;">❌ '+d.error+'</p>';return;}
|
| 2193 |
-
var afterSrc=
|
|
|
|
|
|
|
| 2194 |
if(!afterSrc){res.innerHTML='<p style="color:#e11d48;font-size:11px;">❌ 결과 이미지 없음</p>';return;}
|
| 2195 |
res.innerHTML='<div style="margin-top:10px;">'
|
| 2196 |
+'<div style="font-size:11px;font-weight:700;color:#333;margin-bottom:6px;">📸 Before / After 비교</div>'
|
|
|
|
| 2190 |
fetch(BASE+'/api/imagine-edit',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({prompt:prompt,image_url:_fcData.img}),mode:'cors'}).then(function(r){return r.json();}).then(function(d){
|
| 2191 |
btn.disabled=false;btn.innerHTML='🏥 시뮬레이션 시작';
|
| 2192 |
if(d.error){res.innerHTML='<p style="color:#e11d48;font-size:11px;">❌ '+d.error+'</p>';return;}
|
| 2193 |
+
var afterSrc='';
|
| 2194 |
+
if(d.images&&d.images[0]){afterSrc=d.images[0].data_uri||d.images[0].url||'';}
|
| 2195 |
+
if(!afterSrc){afterSrc=d.data_uri||d.url||'';}
|
| 2196 |
if(!afterSrc){res.innerHTML='<p style="color:#e11d48;font-size:11px;">❌ 결과 이미지 없음</p>';return;}
|
| 2197 |
res.innerHTML='<div style="margin-top:10px;">'
|
| 2198 |
+'<div style="font-size:11px;font-weight:700;color:#333;margin-bottom:6px;">📸 Before / After 비교</div>'
|