Update app.py
Browse files
app.py
CHANGED
|
@@ -80,6 +80,18 @@ async def index():
|
|
| 80 |
line-height: 30px;
|
| 81 |
color: white;
|
| 82 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
</style>
|
| 84 |
</head>
|
| 85 |
<body>
|
|
@@ -93,10 +105,7 @@ async def index():
|
|
| 93 |
<button type="submit">Create Album</button>
|
| 94 |
</form>
|
| 95 |
<h2>Single File Upload</h2>
|
| 96 |
-
<
|
| 97 |
-
<input type="file" name="file" accept="*/*" required><br><br>
|
| 98 |
-
<button type="submit">Upload Single File</button>
|
| 99 |
-
</form>
|
| 100 |
<h2>Search Albums</h2>
|
| 101 |
<form action="/search" method="get">
|
| 102 |
<input type="text" name="query" placeholder="Search by album name..." required>
|
|
@@ -120,10 +129,6 @@ async def index():
|
|
| 120 |
</html>
|
| 121 |
"""
|
| 122 |
|
| 123 |
-
@app.post("/single/upload")
|
| 124 |
-
async def single_upload(file: UploadFile = File(...)):
|
| 125 |
-
return RedirectResponse(url="https://albumup-up1.hf.space/", status_code=303)
|
| 126 |
-
|
| 127 |
@app.post("/album/create")
|
| 128 |
async def create_album(
|
| 129 |
request: Request,
|
|
|
|
| 80 |
line-height: 30px;
|
| 81 |
color: white;
|
| 82 |
}
|
| 83 |
+
.button {
|
| 84 |
+
display: inline-block;
|
| 85 |
+
padding: 10px 20px;
|
| 86 |
+
background-color: #007bff;
|
| 87 |
+
color: white;
|
| 88 |
+
text-decoration: none;
|
| 89 |
+
border-radius: 5px;
|
| 90 |
+
margin: 5px;
|
| 91 |
+
}
|
| 92 |
+
.button:hover {
|
| 93 |
+
background-color: #0056b3;
|
| 94 |
+
}
|
| 95 |
</style>
|
| 96 |
</head>
|
| 97 |
<body>
|
|
|
|
| 105 |
<button type="submit">Create Album</button>
|
| 106 |
</form>
|
| 107 |
<h2>Single File Upload</h2>
|
| 108 |
+
<a href="https://albumup-up1.hf.space/" class="button">Upload Single File</a>
|
|
|
|
|
|
|
|
|
|
| 109 |
<h2>Search Albums</h2>
|
| 110 |
<form action="/search" method="get">
|
| 111 |
<input type="text" name="query" placeholder="Search by album name..." required>
|
|
|
|
| 129 |
</html>
|
| 130 |
"""
|
| 131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 132 |
@app.post("/album/create")
|
| 133 |
async def create_album(
|
| 134 |
request: Request,
|