Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,8 @@ from fastapi.middleware.cors import CORSMiddleware
|
|
9 |
|
10 |
import base64
|
11 |
|
|
|
|
|
12 |
app = FastAPI()
|
13 |
# Configure CORS
|
14 |
app.add_middleware(
|
@@ -26,6 +28,18 @@ imagekit = ImageKit(
|
|
26 |
url_endpoint=os.environ.get("url_endpoint")
|
27 |
)
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
@app.get("/image_upload")
|
30 |
def upload_image(url):
|
31 |
try:
|
|
|
9 |
|
10 |
import base64
|
11 |
|
12 |
+
|
13 |
+
|
14 |
app = FastAPI()
|
15 |
# Configure CORS
|
16 |
app.add_middleware(
|
|
|
28 |
url_endpoint=os.environ.get("url_endpoint")
|
29 |
)
|
30 |
|
31 |
+
|
32 |
+
|
33 |
+
@app.get("/")
|
34 |
+
def read_root():
|
35 |
+
return {
|
36 |
+
"introduction": "Welcome to the AI Photo Creator App! Here's how to use it: "
|
37 |
+
"Step 1: 📸 Tell me what picture you want to take, and I will create one for you. "
|
38 |
+
"Step 2: 🌍 If you feel satisfied with the photo created by me, you can copy and paste "
|
39 |
+
"the photo address and share your photo on our crowd-sourced AI photography website."
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
@app.get("/image_upload")
|
44 |
def upload_image(url):
|
45 |
try:
|