Spaces:
Running
Running
deploy issue fix
Browse files
comic_panel_extractor/annorator_server.py
CHANGED
|
@@ -434,9 +434,9 @@ async def reset_model():
|
|
| 434 |
|
| 435 |
return {'message': 'Model Reseted', 'status': 'success'}
|
| 436 |
|
| 437 |
-
@app.
|
| 438 |
async def deploy_model(app_name: str):
|
| 439 |
-
from yolo_manager import YOLOManager
|
| 440 |
with YOLOManager() as yolo_manager:
|
| 441 |
yolo_manager.deploy()
|
| 442 |
|
|
|
|
| 434 |
|
| 435 |
return {'message': 'Model Reseted', 'status': 'success'}
|
| 436 |
|
| 437 |
+
@app.get("/api/annotate/deploy")
|
| 438 |
async def deploy_model(app_name: str):
|
| 439 |
+
from .yolo_manager import YOLOManager
|
| 440 |
with YOLOManager() as yolo_manager:
|
| 441 |
yolo_manager.deploy()
|
| 442 |
|
comic_panel_extractor/static/annotator.html
CHANGED
|
@@ -1183,14 +1183,13 @@
|
|
| 1183 |
});
|
| 1184 |
|
| 1185 |
document.getElementById('deployBtn').addEventListener('click', async () => {
|
| 1186 |
-
|
| 1187 |
if (!appName) {
|
| 1188 |
appName = "Comic Panel Extractor"
|
| 1189 |
this.showAlert('Using App Name: "Comic Panel Extractor"');
|
| 1190 |
}
|
| 1191 |
|
| 1192 |
try {
|
| 1193 |
-
this.openXterm();
|
| 1194 |
const response = await fetch(`/api/annotate/deploy?app_name=${appName}`);
|
| 1195 |
if (!response.ok) {
|
| 1196 |
throw new Error(`Server error: ${response.status}`);
|
|
|
|
| 1183 |
});
|
| 1184 |
|
| 1185 |
document.getElementById('deployBtn').addEventListener('click', async () => {
|
| 1186 |
+
var appName = document.getElementById('appName').value;
|
| 1187 |
if (!appName) {
|
| 1188 |
appName = "Comic Panel Extractor"
|
| 1189 |
this.showAlert('Using App Name: "Comic Panel Extractor"');
|
| 1190 |
}
|
| 1191 |
|
| 1192 |
try {
|
|
|
|
| 1193 |
const response = await fetch(`/api/annotate/deploy?app_name=${appName}`);
|
| 1194 |
if (!response.ok) {
|
| 1195 |
throw new Error(`Server error: ${response.status}`);
|