Spaces:
Running
Running
Update index.html
Browse files- index.html +15 -4
index.html
CHANGED
@@ -466,6 +466,17 @@
|
|
466 |
</div>
|
467 |
|
468 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
469 |
// Demo Video Modal
|
470 |
const demoBtn = document.getElementById('demo-btn');
|
471 |
const demoModal = document.getElementById('demo-modal');
|
@@ -616,7 +627,7 @@
|
|
616 |
const formData = new FormData();
|
617 |
selectedImages.forEach(file => formData.append('files', file));
|
618 |
|
619 |
-
const res = await fetch(
|
620 |
method: "POST",
|
621 |
body: formData,
|
622 |
});
|
@@ -732,7 +743,7 @@
|
|
732 |
|
733 |
// Mock API call
|
734 |
try {
|
735 |
-
const res = await fetch(
|
736 |
method: "POST",
|
737 |
headers: {
|
738 |
'Content-Type': 'application/json'
|
@@ -809,7 +820,7 @@
|
|
809 |
|
810 |
// Mock API call
|
811 |
try {
|
812 |
-
const res = await fetch(
|
813 |
method: "POST",
|
814 |
headers: {
|
815 |
'Content-Type': 'application/json'
|
@@ -839,7 +850,7 @@
|
|
839 |
|
840 |
// Mock API call
|
841 |
try {
|
842 |
-
const res = await fetch(
|
843 |
method: "POST",
|
844 |
headers: {
|
845 |
'Content-Type': 'application/json'
|
|
|
466 |
</div>
|
467 |
|
468 |
<script>
|
469 |
+
// Configuration for all endpoints
|
470 |
+
const CONFIG = {
|
471 |
+
endpoints: {
|
472 |
+
uploadImages: "https://rahul7star-ohamlab-ai-toolkit.hf.space/upload",
|
473 |
+
uploadZip: "https://rahul7star-ohamlab-ai-toolkit.hf.space/upload-zip",
|
474 |
+
trainModel: "https://rahul7star-ohamlab-ai-toolkit.hf.space/train",
|
475 |
+
generateVideo: "https://rahul7star-ohamlab-ai-toolkit.hf.space/generate-video",
|
476 |
+
updatePlan: "https://rahul7star-ohamlab-ai-toolkit.hf.space/update-plan"
|
477 |
+
}
|
478 |
+
};
|
479 |
+
|
480 |
// Demo Video Modal
|
481 |
const demoBtn = document.getElementById('demo-btn');
|
482 |
const demoModal = document.getElementById('demo-modal');
|
|
|
627 |
const formData = new FormData();
|
628 |
selectedImages.forEach(file => formData.append('files', file));
|
629 |
|
630 |
+
const res = await fetch(CONFIG.endpoints.uploadImages, {
|
631 |
method: "POST",
|
632 |
body: formData,
|
633 |
});
|
|
|
743 |
|
744 |
// Mock API call
|
745 |
try {
|
746 |
+
const res = await fetch(CONFIG.endpoints.trainModel, {
|
747 |
method: "POST",
|
748 |
headers: {
|
749 |
'Content-Type': 'application/json'
|
|
|
820 |
|
821 |
// Mock API call
|
822 |
try {
|
823 |
+
const res = await fetch(CONFIG.endpoints.generateVideo, {
|
824 |
method: "POST",
|
825 |
headers: {
|
826 |
'Content-Type': 'application/json'
|
|
|
850 |
|
851 |
// Mock API call
|
852 |
try {
|
853 |
+
const res = await fetch(CONFIG.endpoints.updatePlan, {
|
854 |
method: "POST",
|
855 |
headers: {
|
856 |
'Content-Type': 'application/json'
|