Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,11 @@ Powered by SAM 3 and multimodal large models, it enables high-fidelity reconstru
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/Python-3.10+-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python"/></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache_2.0-2F80ED?style=flat-square&logo=apache&logoColor=white" alt="License"/></a>
<a href="https://developer.nvidia.com/cuda-downloads"><img src="https://img.shields.io/badge/GPU-CUDA%20Recommended-76B900?style=flat-square&logo=nvidia" alt="CUDA"/></a>
<a href="#-join-wechat-group"><img src="https://img.shields.io/badge/WeChat-Join%20Group-07C160?style=flat-square&logo=wechat&logoColor=white" alt="WeChat"/></a>
<a href="https://github.com/BIT-DataLab/Edit-Banana/stargazers"><img src="https://img.shields.io/github/stars/BIT-DataLab/Edit-Banana?style=flat-square&logo=github" alt="GitHub stars"/></a>
</p>

---

<h3 align="center">Try It Now!</h3>
<p align="center">
<a href="https://editbanana.anxin6.cn/">
<img src="https://img.shields.io/badge/🚀%20Try%20Online%20Demo-editbanana.anxin6.cn-FF6B6B?style=for-the-badge&logoColor=white" alt="Try Online Demo"/>
</a>
</p>

<p align="center">
👆 <b>Click above or https://editbanana.anxin6.cn/ to try Edit Banana online!</b> Upload an image or pdf, get <b>editable DrawIO (XML) or PPTX</b> in seconds.
<b>Please note</b>: Our GitHub repository currently trails behind our web-based service. For the most up-to-date features and performance, we recommend using our web platform.
</p>

## 💬 Join WeChat Group

Welcome to join our WeChat group to discuss and exchange ideas! Scan the QR code below to join:

<p align="center">
<img src="/static/wechat_20260228.jpg" width="70%" alt="WeChat Group QR Code"/>
<br/>
<em>Scan to join the Edit Banana community</em>
</p>

> 💡 If the QR code has expired, please submit an [Issue](https://github.com/XiangjianYi/Image2DrawIO/issues) to request an updated one.

---

## 📸 Effect Demonstration
### High-Definition Input-Output Comparison (3 Typical Scenarios)
To demonstrate the high-fidelity conversion effect, we provides one-to-one comparisons between 3 scenarios of "original static formats" and "editable reconstruction results". All elements can be individually dragged, styled, and modified.
Expand Down
35 changes: 33 additions & 2 deletions server_pa.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
sys.path.insert(0, PROJECT_ROOT)

from fastapi import FastAPI, File, UploadFile, HTTPException
from fastapi.responses import HTMLResponse
from fastapi.middleware.cors import CORSMiddleware
import uvicorn

Expand All @@ -37,9 +38,39 @@ def health():
return {"status": "ok"}


@app.get("/")
@app.get("/", response_class=HTMLResponse)
def root():
return {"service": "Edit Banana", "docs": "/docs"}
return """<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit Banana — Universal Content Re-Editor</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; min-height: 100vh; display: flex; flex-direction: column; background: #fafafa; color: #333; }
main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; text-align: center; }
main img { width: 120px; margin-bottom: 1rem; }
main h1 { font-size: 2rem; margin-bottom: 0.5rem; }
main p { color: #666; max-width: 600px; margin-bottom: 1.5rem; }
main a { color: #2563eb; text-decoration: none; font-weight: 500; }
main a:hover { text-decoration: underline; }
footer { padding: 1.5rem; text-align: center; border-top: 1px solid #e5e7eb; background: #fff; font-size: 0.9rem; color: #888; }
footer a { color: #2563eb; text-decoration: none; }
footer a:hover { text-decoration: underline; }
</style>
</head>
<body>
<main>
<h1>Edit Banana</h1>
<p>Universal Content Re-Editor: Make the Uneditable, Editable. Powered by SAM 3 and multimodal large models.</p>
<a href="/docs">API Documentation</a>
</main>
<footer>
<a href="https://autofigure.org/">AutoFigure</a>
</footer>
</body>
</html>"""


@app.post("/convert")
Expand Down