Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,128 +2,132 @@ import os
|
|
| 2 |
import io
|
| 3 |
import time
|
| 4 |
import requests
|
|
|
|
| 5 |
from flask import Flask, request, jsonify, render_template_string
|
| 6 |
from PIL import Image, ImageOps
|
| 7 |
from huggingface_hub import HfApi
|
| 8 |
|
| 9 |
app = Flask(__name__)
|
| 10 |
|
| 11 |
-
# --- βοΈ SECRETS (Environment Variables
|
| 12 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 13 |
HF_REPO = os.environ.get("HF_REPO")
|
|
|
|
|
|
|
|
|
|
| 14 |
Image.MAX_IMAGE_PIXELS = None
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
# --- π§ SUPER-OPTIMIZER LOGIC ---
|
| 17 |
def dynamic_optimize(image_content, level="extreme"):
|
| 18 |
-
"""
|
| 19 |
-
Image ko user ke level ke hisab se optimize karta hai.
|
| 20 |
-
Levels: none, extreme, high, medium, low
|
| 21 |
-
"""
|
| 22 |
-
# π NONE MODE: Bina chhue original image wapas kar do
|
| 23 |
if level == "none":
|
| 24 |
-
print("π Mode: None (Uploading Original Raw Image)")
|
| 25 |
return image_content
|
| 26 |
|
| 27 |
try:
|
| 28 |
img = Image.open(io.BytesIO(image_content))
|
| 29 |
-
img = ImageOps.exif_transpose(img)
|
|
|
|
| 30 |
|
| 31 |
-
if img.mode in ("RGBA", "P"):
|
| 32 |
-
img = img.convert("RGB")
|
| 33 |
-
|
| 34 |
-
# ποΈ Settings Dictionary
|
| 35 |
settings = {
|
| 36 |
"extreme": {"width": 550, "quality": 70, "method": 6, "target_kb": 60},
|
| 37 |
"high": {"width": 650, "quality": 80, "method": 5, "target_kb": 90},
|
| 38 |
"medium": {"width": 800, "quality": 85, "method": 4, "target_kb": 150},
|
| 39 |
"low": {"width": 1000, "quality": 95, "method": 3, "target_kb": 300}
|
| 40 |
}
|
| 41 |
-
|
| 42 |
-
# Default fallback 'extreme' par rahega
|
| 43 |
conf = settings.get(level, settings["extreme"])
|
| 44 |
|
| 45 |
-
# π Resize Logic (Lanczos algorithm for best quality)
|
| 46 |
if img.width > conf["width"]:
|
| 47 |
ratio = conf["width"] / float(img.width)
|
| 48 |
-
|
| 49 |
-
img = img.resize((conf["width"], new_height), Image.Resampling.LANCZOS)
|
| 50 |
|
| 51 |
-
# π§ͺ Advanced Compression Loop
|
| 52 |
output = io.BytesIO()
|
| 53 |
curr_q = conf["quality"]
|
| 54 |
|
| 55 |
while curr_q > 10:
|
| 56 |
output.seek(0)
|
| 57 |
output.truncate(0)
|
| 58 |
-
img.save(
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
quality=curr_q,
|
| 62 |
-
method=conf["method"], # β’οΈ BEAST MODE COMPRESSION
|
| 63 |
-
optimize=True
|
| 64 |
-
)
|
| 65 |
-
size_kb = output.tell() / 1024
|
| 66 |
-
|
| 67 |
-
if size_kb <= conf["target_kb"]:
|
| 68 |
-
break
|
| 69 |
-
curr_q -= 5 # Dheere-dheere quality girao
|
| 70 |
|
| 71 |
-
output.seek(0)
|
| 72 |
return output.getvalue()
|
| 73 |
-
|
| 74 |
except Exception as e:
|
| 75 |
print(f"β Optimization Error: {e}")
|
| 76 |
-
return image_content
|
| 77 |
|
| 78 |
-
# --- π API ROUTE ---
|
| 79 |
-
@app.route('/upload-poster', methods=['GET'])
|
| 80 |
def handle_upload():
|
| 81 |
-
|
| 82 |
-
|
| 83 |
|
| 84 |
-
if not img_url:
|
| 85 |
-
return jsonify({"success": False, "error": "No URL provided"}), 400
|
| 86 |
if not HF_TOKEN or not HF_REPO:
|
| 87 |
-
return jsonify({"success": False, "error": "HF Secrets missing
|
| 88 |
|
| 89 |
try:
|
| 90 |
-
# 1.
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
# 2.
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
ext = "webp"
|
| 103 |
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
|
|
|
|
|
|
| 107 |
|
| 108 |
-
# 4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
api = HfApi()
|
| 110 |
api.upload_file(
|
| 111 |
-
path_or_fileobj=
|
| 112 |
path_in_repo=path_in_repo,
|
| 113 |
repo_id=HF_REPO,
|
| 114 |
repo_type="dataset",
|
| 115 |
token=HF_TOKEN
|
| 116 |
)
|
| 117 |
|
| 118 |
-
#
|
| 119 |
-
|
|
|
|
| 120 |
|
| 121 |
return jsonify({
|
| 122 |
"success": True,
|
| 123 |
-
"url":
|
|
|
|
| 124 |
"level_used": comp_level,
|
| 125 |
-
"original_size_kb": round(len(
|
| 126 |
-
"
|
| 127 |
})
|
| 128 |
|
| 129 |
except Exception as e:
|
|
@@ -136,78 +140,90 @@ HTML_UI = """
|
|
| 136 |
<head>
|
| 137 |
<meta charset="UTF-8">
|
| 138 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 139 |
-
<title>
|
| 140 |
<style>
|
| 141 |
-
body { font-family: 'Courier New', Courier, monospace; background: #
|
| 142 |
-
.card { background: #
|
| 143 |
-
h2 { color: #
|
| 144 |
-
input
|
| 145 |
-
input, select { background: #
|
| 146 |
-
|
| 147 |
-
button { background: #
|
| 148 |
-
button:
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
.stats { display: flex; justify-content: space-between; font-weight: bold; font-size: 15px; margin-top: 15px; color: #fff; background: #1f2937; padding: 10px; border-radius: 5px;}
|
| 153 |
-
.tag { background: #00ffcc; color: #000; padding: 2px 8px; border-radius: 12px; font-size: 12px; font-weight: bold; margin-left: 10px; vertical-align: middle;}
|
| 154 |
</style>
|
| 155 |
</head>
|
| 156 |
<body>
|
| 157 |
<div class="card">
|
| 158 |
-
<h2>
|
| 159 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
<select id="level">
|
| 161 |
<option value="none">π None (Original Quality, Bypass Compression)</option>
|
| 162 |
-
<option value="extreme" selected>π Extreme (Max Compression, ~60KB
|
| 163 |
-
<option value="
|
| 164 |
-
<option value="medium">π Medium (~150KB, Method 4)</option>
|
| 165 |
-
<option value="low">π Low (Max Quality, ~300KB, Method 3)</option>
|
| 166 |
</select>
|
| 167 |
-
|
|
|
|
| 168 |
|
| 169 |
<div id="result">
|
| 170 |
-
<h3 style="margin:0 0 10px 0;
|
| 171 |
-
<
|
|
|
|
| 172 |
<div class="stats">
|
| 173 |
<span id="oldSize">Original: -- KB</span>
|
| 174 |
-
<span id="newSize" style="color:#
|
| 175 |
</div>
|
| 176 |
-
<
|
| 177 |
</div>
|
| 178 |
</div>
|
| 179 |
|
| 180 |
<script>
|
| 181 |
async function uploadImage() {
|
| 182 |
const btn = document.getElementById('btn');
|
| 183 |
-
const
|
|
|
|
| 184 |
const level = document.getElementById('level').value;
|
| 185 |
const resDiv = document.getElementById('result');
|
| 186 |
|
| 187 |
-
if(!
|
| 188 |
|
| 189 |
-
btn.innerText = "β³
|
| 190 |
btn.disabled = true;
|
| 191 |
resDiv.style.display = "none";
|
| 192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
try {
|
| 194 |
-
const response = await fetch(
|
| 195 |
const data = await response.json();
|
| 196 |
|
| 197 |
if(data.success) {
|
| 198 |
-
document.getElementById('resLink').href = data.url;
|
| 199 |
document.getElementById('resLink').innerText = data.url;
|
| 200 |
-
document.getElementById('resImg').src = data.url;
|
| 201 |
document.getElementById('oldSize').innerText = `Original: ${data.original_size_kb} KB`;
|
| 202 |
-
document.getElementById('newSize').innerText = `
|
| 203 |
resDiv.style.display = "block";
|
| 204 |
} else {
|
| 205 |
alert("β Error: " + data.error);
|
| 206 |
}
|
| 207 |
} catch (err) {
|
| 208 |
-
alert("β Network Error!
|
| 209 |
}
|
| 210 |
-
btn.innerText = "β‘
|
| 211 |
btn.disabled = false;
|
| 212 |
}
|
| 213 |
</script>
|
|
@@ -220,5 +236,4 @@ def index():
|
|
| 220 |
return render_template_string(HTML_UI)
|
| 221 |
|
| 222 |
if __name__ == '__main__':
|
| 223 |
-
# Docker/HF Spaces uses port 7860
|
| 224 |
app.run(host='0.0.0.0', port=7860)
|
|
|
|
| 2 |
import io
|
| 3 |
import time
|
| 4 |
import requests
|
| 5 |
+
import base64
|
| 6 |
from flask import Flask, request, jsonify, render_template_string
|
| 7 |
from PIL import Image, ImageOps
|
| 8 |
from huggingface_hub import HfApi
|
| 9 |
|
| 10 |
app = Flask(__name__)
|
| 11 |
|
| 12 |
+
# --- βοΈ SECRETS (Environment Variables) ---
|
| 13 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 14 |
HF_REPO = os.environ.get("HF_REPO")
|
| 15 |
+
WORKER_URL = os.environ.get("WORKER_URL", "https://your-worker.subdomain.workers.dev/") # CF Worker URL
|
| 16 |
+
XOR_KEY = os.environ.get("XOR_KEY", "badal_master_key") # Tumhari Secret Chabi π
|
| 17 |
+
|
| 18 |
Image.MAX_IMAGE_PIXELS = None
|
| 19 |
|
| 20 |
+
# --- π XOR ENCRYPTION ENGINE ---
|
| 21 |
+
def xor_encrypt_decrypt_bytes(data: bytes, key: str) -> bytes:
|
| 22 |
+
"""Image ke binary data ko corrupt/decrypt karta hai"""
|
| 23 |
+
key_bytes = key.encode()
|
| 24 |
+
key_len = len(key_bytes)
|
| 25 |
+
# Python me bytes ko XOR karna
|
| 26 |
+
return bytes([b ^ key_bytes[i % key_len] for i, b in enumerate(data)])
|
| 27 |
+
|
| 28 |
+
def encrypt_filename(filename: str, key: str) -> str:
|
| 29 |
+
"""Filename ko encrypt karke base64 URL-safe banata hai"""
|
| 30 |
+
xored = "".join(chr(ord(c) ^ ord(key[i % len(key)])) for i, c in enumerate(filename))
|
| 31 |
+
# Padding hata dete hain taaki URL clean dikhe
|
| 32 |
+
return base64.urlsafe_b64encode(xored.encode()).decode().rstrip("=")
|
| 33 |
+
|
| 34 |
# --- π§ SUPER-OPTIMIZER LOGIC ---
|
| 35 |
def dynamic_optimize(image_content, level="extreme"):
|
| 36 |
+
"""Image ko optimize karta hai"""
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
if level == "none":
|
|
|
|
| 38 |
return image_content
|
| 39 |
|
| 40 |
try:
|
| 41 |
img = Image.open(io.BytesIO(image_content))
|
| 42 |
+
img = ImageOps.exif_transpose(img)
|
| 43 |
+
if img.mode in ("RGBA", "P"): img = img.convert("RGB")
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
settings = {
|
| 46 |
"extreme": {"width": 550, "quality": 70, "method": 6, "target_kb": 60},
|
| 47 |
"high": {"width": 650, "quality": 80, "method": 5, "target_kb": 90},
|
| 48 |
"medium": {"width": 800, "quality": 85, "method": 4, "target_kb": 150},
|
| 49 |
"low": {"width": 1000, "quality": 95, "method": 3, "target_kb": 300}
|
| 50 |
}
|
|
|
|
|
|
|
| 51 |
conf = settings.get(level, settings["extreme"])
|
| 52 |
|
|
|
|
| 53 |
if img.width > conf["width"]:
|
| 54 |
ratio = conf["width"] / float(img.width)
|
| 55 |
+
img = img.resize((conf["width"], int(float(img.height) * ratio)), Image.Resampling.LANCZOS)
|
|
|
|
| 56 |
|
|
|
|
| 57 |
output = io.BytesIO()
|
| 58 |
curr_q = conf["quality"]
|
| 59 |
|
| 60 |
while curr_q > 10:
|
| 61 |
output.seek(0)
|
| 62 |
output.truncate(0)
|
| 63 |
+
img.save(output, format='WEBP', quality=curr_q, method=conf["method"], optimize=True)
|
| 64 |
+
if (output.tell() / 1024) <= conf["target_kb"]: break
|
| 65 |
+
curr_q -= 5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
|
|
|
| 67 |
return output.getvalue()
|
|
|
|
| 68 |
except Exception as e:
|
| 69 |
print(f"β Optimization Error: {e}")
|
| 70 |
+
return image_content
|
| 71 |
|
| 72 |
+
# --- π API ROUTE (Handles BOTH URL and DIRECT FILE) ---
|
| 73 |
+
@app.route('/upload-poster', methods=['GET', 'POST'])
|
| 74 |
def handle_upload():
|
| 75 |
+
comp_level = request.args.get('level', request.form.get('level', 'extreme')).lower()
|
| 76 |
+
image_content = None
|
| 77 |
|
|
|
|
|
|
|
| 78 |
if not HF_TOKEN or not HF_REPO:
|
| 79 |
+
return jsonify({"success": False, "error": "HF Secrets missing!"}), 500
|
| 80 |
|
| 81 |
try:
|
| 82 |
+
# 1. Check if Direct File Upload
|
| 83 |
+
if 'file' in request.files and request.files['file'].filename != '':
|
| 84 |
+
file = request.files['file']
|
| 85 |
+
image_content = file.read()
|
| 86 |
+
|
| 87 |
+
# 2. Check if URL Upload
|
| 88 |
+
elif request.args.get('url') or request.form.get('url'):
|
| 89 |
+
img_url = request.args.get('url') or request.form.get('url')
|
| 90 |
+
resp = requests.get(img_url, timeout=20)
|
| 91 |
+
if resp.status_code != 200:
|
| 92 |
+
return jsonify({"success": False, "error": "URL Download failed"}), 400
|
| 93 |
+
image_content = resp.content
|
|
|
|
| 94 |
|
| 95 |
+
if not image_content:
|
| 96 |
+
return jsonify({"success": False, "error": "No file or URL provided"}), 400
|
| 97 |
+
|
| 98 |
+
# 3. Optimize Image
|
| 99 |
+
optimized_data = dynamic_optimize(image_content, comp_level)
|
| 100 |
|
| 101 |
+
# 4. π ENCRYPT THE IMAGE DATA (Magic Happens Here!)
|
| 102 |
+
encrypted_image_data = xor_encrypt_decrypt_bytes(optimized_data, XOR_KEY)
|
| 103 |
+
|
| 104 |
+
# 5. Generate Real Filename & Encrypt it
|
| 105 |
+
real_filename = f"img_{int(time.time())}_{os.urandom(3).hex()}.webp"
|
| 106 |
+
encrypted_filename = encrypt_filename(real_filename, XOR_KEY)
|
| 107 |
+
|
| 108 |
+
path_in_repo = f"posters/{real_filename}"
|
| 109 |
+
|
| 110 |
+
# 6. Upload ENCRYPTED GARBAGE to Hugging Face
|
| 111 |
api = HfApi()
|
| 112 |
api.upload_file(
|
| 113 |
+
path_or_fileobj=encrypted_image_data, # Uploading corrupted bytes
|
| 114 |
path_in_repo=path_in_repo,
|
| 115 |
repo_id=HF_REPO,
|
| 116 |
repo_type="dataset",
|
| 117 |
token=HF_TOKEN
|
| 118 |
)
|
| 119 |
|
| 120 |
+
# 7. Create Final Worker URL for User
|
| 121 |
+
worker_base = WORKER_URL if WORKER_URL.endswith('/') else WORKER_URL + '/'
|
| 122 |
+
final_cf_url = f"{worker_base}{encrypted_filename}"
|
| 123 |
|
| 124 |
return jsonify({
|
| 125 |
"success": True,
|
| 126 |
+
"url": final_cf_url, # Cloudflare Worker URL with Encrypted Name
|
| 127 |
+
"real_hf_filename": real_filename, # (Just for debugging, DB me mat dalna)
|
| 128 |
"level_used": comp_level,
|
| 129 |
+
"original_size_kb": round(len(image_content)/1024, 2),
|
| 130 |
+
"encrypted_size_kb": round(len(encrypted_image_data)/1024, 2)
|
| 131 |
})
|
| 132 |
|
| 133 |
except Exception as e:
|
|
|
|
| 140 |
<head>
|
| 141 |
<meta charset="UTF-8">
|
| 142 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 143 |
+
<title>Skynet DMCA Killer</title>
|
| 144 |
<style>
|
| 145 |
+
body { font-family: 'Courier New', Courier, monospace; background: #050505; color: #0f0; padding: 20px; max-width: 800px; margin: auto; }
|
| 146 |
+
.card { background: #111; padding: 25px; border-radius: 8px; border: 1px solid #0f0; box-shadow: 0 0 15px rgba(0, 255, 0, 0.2); }
|
| 147 |
+
h2 { color: #0f0; border-bottom: 1px dashed #0f0; padding-bottom: 10px; text-transform: uppercase; }
|
| 148 |
+
.input-group { background: #1a1a1a; padding: 15px; border-radius: 5px; margin-bottom: 15px; border: 1px solid #333; }
|
| 149 |
+
input[type="text"], input[type="file"], select { width: 100%; padding: 12px; margin: 8px 0; background: #000; color: #0f0; border: 1px solid #0f0; outline: none; box-sizing: border-box; }
|
| 150 |
+
button { width: 100%; padding: 15px; background: #0f0; color: #000; font-weight: bold; border: none; cursor: pointer; text-transform: uppercase; margin-top: 10px; font-size: 16px; }
|
| 151 |
+
button:hover { background: #fff; color: #000; }
|
| 152 |
+
button:disabled { background: #333; color: #666; cursor: not-allowed; }
|
| 153 |
+
#result { margin-top: 25px; padding: 15px; background: #002200; border-left: 4px solid #0f0; display: none; word-wrap: break-word; }
|
| 154 |
+
.url-box { background: #000; padding: 10px; border: 1px dashed #0f0; margin: 10px 0; font-size: 14px; }
|
| 155 |
+
.stats { display: flex; justify-content: space-between; font-weight: bold; font-size: 14px; margin-top: 10px; color: #fff; }
|
|
|
|
|
|
|
| 156 |
</style>
|
| 157 |
</head>
|
| 158 |
<body>
|
| 159 |
<div class="card">
|
| 160 |
+
<h2>π‘οΈ DMCA Killer v4.0 (XOR Encrypted)</h2>
|
| 161 |
+
|
| 162 |
+
<div class="input-group">
|
| 163 |
+
<label><b>Option 1: Paste Image URL</b></label>
|
| 164 |
+
<input type="text" id="imgUrl" placeholder="π https://example.com/movie.jpg">
|
| 165 |
+
</div>
|
| 166 |
+
|
| 167 |
+
<div class="input-group">
|
| 168 |
+
<label><b>Option 2: Direct File Upload</b></label>
|
| 169 |
+
<input type="file" id="imgFile" accept="image/*">
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
<select id="level">
|
| 173 |
<option value="none">π None (Original Quality, Bypass Compression)</option>
|
| 174 |
+
<option value="extreme" selected>π Extreme (Max Compression, ~60KB)</option>
|
| 175 |
+
<option value="medium">π Medium (~150KB)</option>
|
|
|
|
|
|
|
| 176 |
</select>
|
| 177 |
+
|
| 178 |
+
<button onclick="uploadImage()" id="btn">β‘ Encrypt & Deploy to HF</button>
|
| 179 |
|
| 180 |
<div id="result">
|
| 181 |
+
<h3 style="margin:0 0 10px 0;">β
DEPLOYMENT SUCCESSFUL</h3>
|
| 182 |
+
<p style="margin: 0; color: #aaa;">Cloudflare Worker URL (Safe for DB):</p>
|
| 183 |
+
<div class="url-box" id="resLink"></div>
|
| 184 |
<div class="stats">
|
| 185 |
<span id="oldSize">Original: -- KB</span>
|
| 186 |
+
<span id="newSize" style="color:#0f0;">Encrypted: -- KB</span>
|
| 187 |
</div>
|
| 188 |
+
<p style="margin-top: 10px; font-size: 12px; color: yellow;">β οΈ Note: This URL will only work if your Cloudflare Worker is active!</p>
|
| 189 |
</div>
|
| 190 |
</div>
|
| 191 |
|
| 192 |
<script>
|
| 193 |
async function uploadImage() {
|
| 194 |
const btn = document.getElementById('btn');
|
| 195 |
+
const urlInput = document.getElementById('imgUrl').value;
|
| 196 |
+
const fileInput = document.getElementById('imgFile').files[0];
|
| 197 |
const level = document.getElementById('level').value;
|
| 198 |
const resDiv = document.getElementById('result');
|
| 199 |
|
| 200 |
+
if(!urlInput && !fileInput) { alert("Please provide a URL or select a File!"); return; }
|
| 201 |
|
| 202 |
+
btn.innerText = "β³ Encrypting Data & Uploading...";
|
| 203 |
btn.disabled = true;
|
| 204 |
resDiv.style.display = "none";
|
| 205 |
|
| 206 |
+
let formData = new FormData();
|
| 207 |
+
formData.append('level', level);
|
| 208 |
+
if(fileInput) formData.append('file', fileInput);
|
| 209 |
+
else formData.append('url', urlInput);
|
| 210 |
+
|
| 211 |
try {
|
| 212 |
+
const response = await fetch('/upload-poster', { method: 'POST', body: formData });
|
| 213 |
const data = await response.json();
|
| 214 |
|
| 215 |
if(data.success) {
|
|
|
|
| 216 |
document.getElementById('resLink').innerText = data.url;
|
|
|
|
| 217 |
document.getElementById('oldSize').innerText = `Original: ${data.original_size_kb} KB`;
|
| 218 |
+
document.getElementById('newSize').innerText = `Encrypted: ${data.encrypted_size_kb} KB`;
|
| 219 |
resDiv.style.display = "block";
|
| 220 |
} else {
|
| 221 |
alert("β Error: " + data.error);
|
| 222 |
}
|
| 223 |
} catch (err) {
|
| 224 |
+
alert("β Critical Network Error!");
|
| 225 |
}
|
| 226 |
+
btn.innerText = "β‘ Encrypt & Deploy to HF";
|
| 227 |
btn.disabled = false;
|
| 228 |
}
|
| 229 |
</script>
|
|
|
|
| 236 |
return render_template_string(HTML_UI)
|
| 237 |
|
| 238 |
if __name__ == '__main__':
|
|
|
|
| 239 |
app.run(host='0.0.0.0', port=7860)
|