Spaces:
Sleeping
Sleeping
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>🧩 Object Cutter</title> | |
<link rel="icon" href="/static/favicon.ico" type="image/x-icon"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { | |
background-color: #1e1e1e; | |
color: #e0e0e0; | |
font-family: Arial, sans-serif; | |
margin: 0; | |
height: 100vh; | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
.wrapper { | |
text-align: center; | |
width: 100%; | |
max-width: 400px; | |
} | |
h1 { | |
color: #a0ffaf; | |
font-size: 28px; | |
margin-bottom: 30px; | |
} | |
form { | |
display: flex; | |
flex-direction: column; | |
gap: 20px; | |
} | |
input[type="text"], | |
input[type="file"] { | |
padding: 10px; | |
background-color: #2b2b2b; | |
border: 1px solid #444; | |
color: #fff; | |
border-radius: 5px; | |
} | |
input[type="submit"] { | |
padding: 10px; | |
background-color: #3e8e41; | |
color: white; | |
border: none; | |
cursor: pointer; | |
border-radius: 5px; | |
} | |
input[type="submit"]:hover { | |
background-color: #367635; | |
} | |
.loading { | |
display: none; | |
margin-top: 20px; | |
font-size: 16px; | |
color: #a0ffaf; | |
} | |
.spinner { | |
border: 4px solid #2b2b2b; | |
border-top: 4px solid #3e8e41; | |
border-radius: 50%; | |
width: 30px; | |
height: 30px; | |
animation: spin 1s linear infinite; | |
margin: 10px auto; | |
} | |
@keyframes spin { | |
0% { transform: rotate(0deg); } | |
100% { transform: rotate(360deg); } | |
} | |
</style> | |
</head> | |
<body> | |
<div class="wrapper"> | |
<h1>🧩 Object Cutter</h1> | |
<form action="/process" method="post" enctype="multipart/form-data" onsubmit="showLoading()"> | |
<label for="image">Choose image:</label> | |
<input type="file" id="image" name="image" accept="image/*" required> | |
<label for="prompt">Object description (prompt):</label> | |
<input type="text" id="prompt" name="prompt" placeholder="e.g., a glass of water" required> | |
<input type="submit" value="Run Detection"> | |
</form> | |
<div class="loading" id="loading"> | |
<div class="spinner"></div> | |
Processing... | |
</div> | |
</div> | |
<script> | |
function showLoading() { | |
document.getElementById('loading').style.display = 'block'; | |
} | |
</script> | |
</body> | |
</html> | |