Spaces:
Runtime error
Runtime error
Download app.py from Codergeek911/omni-image-editor-API: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/spaces/Codergeek911/omni-image-editor-API/resolve/main/app.py
- Command line
-
hf download hf://spaces/Codergeek911/omni-image-editor-API/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Codergeek911/omni-image-editor-API/resolve/main/app.py
1.15 kB
| 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""" | |
| <iframe | |
| src="{source_space_url}" | |
| frameborder="0" | |
| width="100%" | |
| height="100%" | |
| style="min-height: 800px; border-radius: 8px;" | |
| allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; getattr" | |
| allowfullscreen> | |
| </iframe> | |
| """) | |
| if __name__ == "__main__": | |
| demo.launch() |