import gradio as gr # เปลี่ยน URL เป็นเวอร์ชัน "embed" (สำคัญมาก) # จากเดิม: https://huggingface.co/spaces/selfit-camera/omni-image-editor # เป็น: https://selfit-camera-omni-image-editor.hf.space (Direct Link) source_space_url = "https://selfit-camera-omni-image-editor.hf.space" print("=== กำลังโหลดหน้า Interface ผ่าน Direct Embed Link ===") with gr.Blocks(fill_height=True) as demo: # ใช้ Iframe ชี้ไปที่ Direct Link ของ Space นั้นๆ # วิธีนี้จะไม่โดนปฏิเสธการเชื่อมต่อ (Refused to connect) gr.HTML(f""" """) if __name__ == "__main__": demo.launch()