Update app.py
Browse files
app.py
CHANGED
@@ -251,8 +251,8 @@ def generate_planet_info(
|
|
251 |
# -----------------------------
|
252 |
child_summary = ""
|
253 |
child_summary += f"สวัสดีหนูน้อยนักสำรวจ!\n\n"
|
254 |
-
child_summary += f"ดาว
|
255 |
-
child_summary += f"โคจรรอบดาวฤกษ์
|
256 |
|
257 |
child_summary += f"ระยะห่าง ~{distance_au} AU => ประเมินอุณหภูมิ ~{temp_c}°C\n"
|
258 |
if temp_c < -20:
|
@@ -287,7 +287,7 @@ def generate_planet_info(
|
|
287 |
elif oxygen_percent > 30:
|
288 |
child_summary += "สูงมาก ระวังไฟติดง่ายนะ\n"
|
289 |
|
290 |
-
child_summary += f"สิ่งมีชีวิต:
|
291 |
child_summary += "ลองคิดดูสิว่าหน้าตาจะเป็นยังไง!\n\n"
|
292 |
child_summary += "พร้อมลุยกันแล้วหรือยัง!?"
|
293 |
|
@@ -458,11 +458,10 @@ def welcome_text():
|
|
458 |
return "ยินดีต้อนรับสู่ Planetary Adventure++ (Optimized)! ลองกรอกข้อมูลแล้วกด 'สร้างโลกแฟนตาซี' สิ!"
|
459 |
|
460 |
with gr.Blocks(css=css_code) as demo:
|
461 |
-
gr.Markdown("<h1 id='title'>Planetary Adventure
|
462 |
gr.Markdown("""
|
463 |
<div class="game-desc">
|
464 |
-
<p
|
465 |
-
ส่วนคำบรรยายอื่นๆ เก็บคำแปลล่วงหน้า</p>
|
466 |
<p>ใส่ข้อมูล แล้วกด <strong>"สร้างโลกแฟนตาซี"</strong> เพื่อดู
|
467 |
<em>สรุปสำหรับเด็ก</em>, <em>รายละเอียด (ไทย)</em>, และ <em>3 Prompts อังกฤษ</em></p>
|
468 |
<p>ถ้าอยากดูสูตรคำนวณ กดปุ่ม "โชว์สูตรคำนวณ" ได้เลย!</p>
|
@@ -560,7 +559,7 @@ with gr.Blocks(css=css_code) as demo:
|
|
560 |
)
|
561 |
|
562 |
def welcome_text():
|
563 |
-
return "ยินดีต้อนรับสู่ Planetary Adventure
|
564 |
|
565 |
demo.load(fn=welcome_text, inputs=None, outputs=child_summary_out)
|
566 |
|
|
|
251 |
# -----------------------------
|
252 |
child_summary = ""
|
253 |
child_summary += f"สวัสดีหนูน้อยนักสำรวจ!\n\n"
|
254 |
+
child_summary += f"ดาว {planet_name_th} ที่หนูสร้าง เป็น{planet_type_th} "
|
255 |
+
child_summary += f"โคจรรอบดาวฤกษ์ {star_type_en}\n"
|
256 |
|
257 |
child_summary += f"ระยะห่าง ~{distance_au} AU => ประเมินอุณหภูมิ ~{temp_c}°C\n"
|
258 |
if temp_c < -20:
|
|
|
287 |
elif oxygen_percent > 30:
|
288 |
child_summary += "สูงมาก ระวังไฟติดง่ายนะ\n"
|
289 |
|
290 |
+
child_summary += f"สิ่งมีชีวิต: {life_th}\n"
|
291 |
child_summary += "ลองคิดดูสิว่าหน้าตาจะเป็นยังไง!\n\n"
|
292 |
child_summary += "พร้อมลุยกันแล้วหรือยัง!?"
|
293 |
|
|
|
458 |
return "ยินดีต้อนรับสู่ Planetary Adventure++ (Optimized)! ลองกรอกข้อมูลแล้วกด 'สร้างโลกแฟนตาซี' สิ!"
|
459 |
|
460 |
with gr.Blocks(css=css_code) as demo:
|
461 |
+
gr.Markdown("<h1 id='title'>ZenityX Planetary Adventure</h1>")
|
462 |
gr.Markdown("""
|
463 |
<div class="game-desc">
|
464 |
+
<p>(พัฒนาโดยสถาบัน ZenityX AI Studio)</p>
|
|
|
465 |
<p>ใส่ข้อมูล แล้วกด <strong>"สร้างโลกแฟนตาซี"</strong> เพื่อดู
|
466 |
<em>สรุปสำหรับเด็ก</em>, <em>รายละเอียด (ไทย)</em>, และ <em>3 Prompts อังกฤษ</em></p>
|
467 |
<p>ถ้าอยากดูสูตรคำนวณ กดปุ่ม "โชว์สูตรคำนวณ" ได้เลย!</p>
|
|
|
559 |
)
|
560 |
|
561 |
def welcome_text():
|
562 |
+
return "ยินดีต้อนรับสู่ ZenityX Planetary Adventure! ลองกรอกข้อมูลแล้วกด 'สร้างโลกแฟนตาซี' สิ!"
|
563 |
|
564 |
demo.load(fn=welcome_text, inputs=None, outputs=child_summary_out)
|
565 |
|