Spaces:
Sleeping
Sleeping
Update webui/run_app.py
Browse files- webui/run_app.py +19 -13
webui/run_app.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
|
| 2 |
import os
|
| 3 |
import sys
|
| 4 |
import time
|
|
@@ -237,7 +236,7 @@ async def api_generate(
|
|
| 237 |
wm_filename = f"wm_{filename}"
|
| 238 |
watermarked_path = os.path.join(OUTPUT_DIR, wm_filename)
|
| 239 |
|
| 240 |
-
drawtext_filter = "drawtext=text='Hugging/
|
| 241 |
ffmpeg_cmd = [
|
| 242 |
'ffmpeg', '-y',
|
| 243 |
'-i', video_path,
|
|
@@ -306,7 +305,7 @@ async def index_page():
|
|
| 306 |
<p>⚠️ <strong>Hosting Environment Notice:</strong> This platform is deployed on a <strong>Free Tier Shared Server (2 vCPU, 16GB RAM, Shared Core Containers)</strong> on Hugging Face. Due to unallocated shared hardware limits, video generation cycles can be quite lengthy. To actively protect our instance against memory crashes or sudden cluster restarts, strict thread concurrency thresholds have been applied. We sincerely apologize for any processing delays and thank you for your understanding.</p>
|
| 307 |
<p>☕ <strong>Empower the Infrastructure:</strong> To expand our server performance capacities, maintain uninterrupted deployment pipelines, and invest in our upcoming formal platform architectures, your contributions are crucial! Our commercial premium license matrix remains incredibly cost-effective, with the highest tier priced under the cost of two standard cups of coffee. Secure your high-speed access keys here:</p>
|
| 308 |
<div class="bg-indigo-50 border border-indigo-100 p-4 rounded-2xl flex flex-col sm:flex-row items-center justify-between gap-4">
|
| 309 |
-
<span class="text-xs font-bold text-indigo-900 uppercase tracking-wide"><i class="fa-solid fa-cookie-bite mr-2"></i> Free tier users: 3 video creations/day (1 video per batch, 3-hour cooldown) with mobile fluid watermark.</span>
|
| 310 |
<a href="https://huggingface.co/spaces/AbuAlone09/my-licensify-server" target="_blank" class="bg-indigo-600 text-white font-extrabold px-6 py-2.5 rounded-xl text-xs uppercase tracking-wider hover:bg-indigo-700 transition-all shadow-md shrink-0 text-center w-full sm:w-auto">
|
| 311 |
<i class="fa-solid fa-key mr-1.5"></i> Purchase Premium Keys
|
| 312 |
</a>
|
|
@@ -315,7 +314,7 @@ async def index_page():
|
|
| 315 |
|
| 316 |
<div class="glass-card rounded-[3rem] p-6 md:p-10 shadow-xl border border-slate-200 mb-8">
|
| 317 |
<div class="flex items-center gap-4 mb-6">
|
| 318 |
-
<div class="w-12 h-12 bg-
|
| 319 |
<i class="fa-solid fa-lock text-xl"></i>
|
| 320 |
</div>
|
| 321 |
<div>
|
|
@@ -378,9 +377,16 @@ async def index_page():
|
|
| 378 |
<label class="text-xs font-black text-slate-500 uppercase tracking-wider block mb-2">Voice Speed Selection</label>
|
| 379 |
<select name="voice_rate" class="w-full bg-slate-50 border-2 border-slate-100 rounded-xl px-4 py-3 text-slate-800 focus:border-blue-500 outline-none font-medium">
|
| 380 |
<option value="0.5">0.5x</option>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 381 |
<option value="1.0" selected>1.0x (Normal)</option>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 382 |
<option value="1.5">1.5x</option>
|
| 383 |
-
<option value="2.0">2.0x</option>
|
| 384 |
</select>
|
| 385 |
</div>
|
| 386 |
</div>
|
|
@@ -487,22 +493,22 @@ async def index_page():
|
|
| 487 |
keyDetails.innerHTML = `
|
| 488 |
<div class="text-emerald-600 font-extrabold grid grid-cols-1 gap-1.5 text-xs">
|
| 489 |
<div class="text-emerald-700 font-black text-sm border-b border-emerald-100 pb-1 flex items-center gap-1">
|
| 490 |
-
<i class="fa-solid fa-circle-check text-base"></i> [✅
|
| 491 |
</div>
|
| 492 |
-
<div>🆔 <strong>
|
| 493 |
-
<div>👤 <strong>
|
| 494 |
-
<div>💰 <strong>
|
| 495 |
-
<div>📅 <strong>
|
| 496 |
-
<div>⏳ <strong>
|
| 497 |
</div>
|
| 498 |
`;
|
| 499 |
}} else {{
|
| 500 |
adminPanel.classList.add("hidden");
|
| 501 |
-
keyDetails.innerHTML = '<div class="text-rose-600 font-black text-sm flex items-center gap-1"><i class="fa-solid fa-circle-xmark text-base"></i> [❌
|
| 502 |
}}
|
| 503 |
}} catch (error) {{
|
| 504 |
adminPanel.classList.add("hidden");
|
| 505 |
-
keyDetails.innerHTML = '<div class="text-rose-600 font-black text-xs"><i class="fa-solid fa-circle-xmark mr-1"></i> [❌
|
| 506 |
}}
|
| 507 |
}}
|
| 508 |
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
import sys
|
| 3 |
import time
|
|
|
|
| 236 |
wm_filename = f"wm_{filename}"
|
| 237 |
watermarked_path = os.path.join(OUTPUT_DIR, wm_filename)
|
| 238 |
|
| 239 |
+
drawtext_filter = "drawtext=text='Hugging/AiVideoEngine':x='mod(t*35,w)':y='mod(t*15,h)':fontsize=24:fontcolor=white@0.35"
|
| 240 |
ffmpeg_cmd = [
|
| 241 |
'ffmpeg', '-y',
|
| 242 |
'-i', video_path,
|
|
|
|
| 305 |
<p>⚠️ <strong>Hosting Environment Notice:</strong> This platform is deployed on a <strong>Free Tier Shared Server (2 vCPU, 16GB RAM, Shared Core Containers)</strong> on Hugging Face. Due to unallocated shared hardware limits, video generation cycles can be quite lengthy. To actively protect our instance against memory crashes or sudden cluster restarts, strict thread concurrency thresholds have been applied. We sincerely apologize for any processing delays and thank you for your understanding.</p>
|
| 306 |
<p>☕ <strong>Empower the Infrastructure:</strong> To expand our server performance capacities, maintain uninterrupted deployment pipelines, and invest in our upcoming formal platform architectures, your contributions are crucial! Our commercial premium license matrix remains incredibly cost-effective, with the highest tier priced under the cost of two standard cups of coffee. Secure your high-speed access keys here:</p>
|
| 307 |
<div class="bg-indigo-50 border border-indigo-100 p-4 rounded-2xl flex flex-col sm:flex-row items-center justify-between gap-4">
|
| 308 |
+
<span class="text-xs font-bold text-indigo-900 uppercase tracking-wide"><i class="fa-solid fa-cookie-bite mr-2"></i> Free tier users: 3 video creations/day (1 video per batch, 3-hour cooldown) with mobile fluid watermark. For comprehensive service tier details and premium pricing models, please click our licensing gateway.</span>
|
| 309 |
<a href="https://huggingface.co/spaces/AbuAlone09/my-licensify-server" target="_blank" class="bg-indigo-600 text-white font-extrabold px-6 py-2.5 rounded-xl text-xs uppercase tracking-wider hover:bg-indigo-700 transition-all shadow-md shrink-0 text-center w-full sm:w-auto">
|
| 310 |
<i class="fa-solid fa-key mr-1.5"></i> Purchase Premium Keys
|
| 311 |
</a>
|
|
|
|
| 314 |
|
| 315 |
<div class="glass-card rounded-[3rem] p-6 md:p-10 shadow-xl border border-slate-200 mb-8">
|
| 316 |
<div class="flex items-center gap-4 mb-6">
|
| 317 |
+
<div class="w-12 h-12 bg-slate-900 rounded-2xl flex items-center justify-center text-white shadow-lg shadow-indigo-200">
|
| 318 |
<i class="fa-solid fa-lock text-xl"></i>
|
| 319 |
</div>
|
| 320 |
<div>
|
|
|
|
| 377 |
<label class="text-xs font-black text-slate-500 uppercase tracking-wider block mb-2">Voice Speed Selection</label>
|
| 378 |
<select name="voice_rate" class="w-full bg-slate-50 border-2 border-slate-100 rounded-xl px-4 py-3 text-slate-800 focus:border-blue-500 outline-none font-medium">
|
| 379 |
<option value="0.5">0.5x</option>
|
| 380 |
+
<option value="0.6">0.6x</option>
|
| 381 |
+
<option value="0.7">0.7x</option>
|
| 382 |
+
<option value="0.8">0.8x</option>
|
| 383 |
+
<option value="0.9">0.9x</option>
|
| 384 |
<option value="1.0" selected>1.0x (Normal)</option>
|
| 385 |
+
<option value="1.1">1.1x</option>
|
| 386 |
+
<option value="1.2">1.2x</option>
|
| 387 |
+
<option value="1.3">1.3x</option>
|
| 388 |
+
<option value="1.4">1.4x</option>
|
| 389 |
<option value="1.5">1.5x</option>
|
|
|
|
| 390 |
</select>
|
| 391 |
</div>
|
| 392 |
</div>
|
|
|
|
| 493 |
keyDetails.innerHTML = `
|
| 494 |
<div class="text-emerald-600 font-extrabold grid grid-cols-1 gap-1.5 text-xs">
|
| 495 |
<div class="text-emerald-700 font-black text-sm border-b border-emerald-100 pb-1 flex items-center gap-1">
|
| 496 |
+
<i class="fa-solid fa-circle-check text-base"></i> [✅ VALID ACCESS KEY]
|
| 497 |
</div>
|
| 498 |
+
<div>🆔 <strong>Transaction Identifier (TxID):</strong> ${{data.key_info.tx_id}}</div>
|
| 499 |
+
<div>👤 <strong>Subscription Model (Tier):</strong> ${{data.key_info.type.toUpperCase()}}</div>
|
| 500 |
+
<div>💰 <strong>Amount Paid:</strong> ${{data.key_info.amount}}</div>
|
| 501 |
+
<div>📅 <strong>Issued Date:</strong> ${{data.key_info.issued_date}}</div>
|
| 502 |
+
<div>⏳ <strong>Expiration Frame (Expiry Date):</strong> ${{data.key_info.expiry_date}} (${{data.key_info.days_left}} days left)</div>
|
| 503 |
</div>
|
| 504 |
`;
|
| 505 |
}} else {{
|
| 506 |
adminPanel.classList.add("hidden");
|
| 507 |
+
keyDetails.innerHTML = '<div class="text-rose-600 font-black text-sm flex items-center gap-1"><i class="fa-solid fa-circle-xmark text-base"></i> [❌ INVALID SECURITY KEY] The access token specified does not exist or has expired!</div>';
|
| 508 |
}}
|
| 509 |
}} catch (error) {{
|
| 510 |
adminPanel.classList.add("hidden");
|
| 511 |
+
keyDetails.innerHTML = '<div class="text-rose-600 font-black text-xs"><i class="fa-solid fa-circle-xmark mr-1"></i> [❌ NODE ERROR] Authentication node failed to respond.</div>';
|
| 512 |
}}
|
| 513 |
}}
|
| 514 |
|