Rayan545454 commited on
Commit
9019b5a
·
verified ·
1 Parent(s): ebf0a6c

multimodalart/Qwen-Image-Fast - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +126 -42
index.html CHANGED
@@ -5,6 +5,7 @@
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>بوابة الدفع - PayTabs | الدفع بفيزا</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
 
8
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
  <link rel="preload" href="https://upload.wikimedia.org/wikipedia/commons/5/5e/Visa_Inc._logo.svg" as="image">
10
  <style>
@@ -38,6 +39,13 @@
38
  transform: translateY(-2px);
39
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
40
  }
 
 
 
 
 
 
 
41
  </style>
42
  </head>
43
  <body class="bg-gray-50 min-h-screen">
@@ -52,10 +60,38 @@
52
  <h1 class="text-3xl font-bold text-gray-800 mb-2">
53
  <i class="fas fa-phone-alt text-green-600 mr-2"></i>
54
  بوابة الدفع الآمن
 
 
 
55
  </h1>
56
  <p class="text-gray-600">أكمل عملية الدفع بكل سهولة وأمان</p>
57
  </header>
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  <!-- Payment Form -->
60
  <div class="max-w-2xl mx-auto">
61
  <div class="payment-card rounded-xl shadow-lg overflow-hidden border border-gray-200">
@@ -314,6 +350,62 @@
314
  </div>
315
 
316
  <script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
  // Copy IBAN function
318
  function copyIBAN() {
319
  const iban = document.getElementById('ibanText').innerText;
@@ -326,37 +418,6 @@
326
 
327
  // Simple validation and input formatting
328
  document.addEventListener('DOMContentLoaded', function() {
329
- // Card preview functionality
330
- const cardNumberInput = document.querySelector('input[placeholder="رقم البطاقة"]');
331
- const cardNameInput = document.querySelector('input[placeholder="اسم حامل البطاقة"]');
332
- const expiryInput = document.querySelector('input[placeholder="MM/YY"]');
333
-
334
- // Update card preview in real-time
335
- function updateCardPreview() {
336
- const previewNumber = document.querySelector('.card-number');
337
- const previewName = document.querySelector('.name-value');
338
- const previewExpiry = document.querySelector('.expiry-value');
339
-
340
- // Format card number
341
- let cardNumber = cardNumberInput.value.replace(/\D/g, '');
342
- if (cardNumber.length > 0) {
343
- cardNumber = cardNumber.match(/.{1,4}/g).join(' ');
344
- } else {
345
- cardNumber = '#### #### #### ####';
346
- }
347
-
348
- previewNumber.textContent = cardNumber;
349
- previewName.textContent = cardNameInput.value || '----';
350
- previewExpiry.textContent = expiryInput.value || 'MM/YY';
351
- }
352
-
353
- // Add event listeners
354
- [cardNumberInput, cardNameInput, expiryInput].forEach(input => {
355
- input.addEventListener('input', updateCardPreview);
356
- });
357
-
358
- // Initialize preview
359
- updateCardPreview();
360
  // Visa button and card form handling
361
  const visaBtn = document.getElementById('visaBtn');
362
  const cardForm = document.getElementById('cardForm');
@@ -422,18 +483,41 @@
422
  <!-- Load Payment Widgets Script -->
423
  <script src="https://test.oppwa.com/v1/paymentWidgets.js?checkoutId=YOUR_CHECKOUT_ID"></script>
424
  <script>
425
- document.addEventListener('DOMContentLoaded', function() {
426
- // Card preview functionality
427
- const cardNumber = document.querySelector('.card-number');
428
- const nameValue = document.querySelector('.name-value');
429
- const expiryValue = document.querySelector('.expiry-value');
 
 
 
 
 
 
 
 
 
 
 
 
430
 
431
- // Sample data - in real app these would come from form inputs
432
- setTimeout(() => {
433
- cardNumber.textContent = '1234 5678 9012 3456';
434
- nameValue.textContent = 'محمد أحمد';
435
- expiryValue.textContent = '12/25';
436
- }, 1000);
 
 
 
 
 
 
 
 
 
 
 
437
  });
438
  </script>
439
  <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Rayan545454/rdddddddd" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
 
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>بوابة الدفع - PayTabs | الدفع بفيزا</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://cdn.jsdelivr.net/npm/kittentts-web@latest/dist/kittentts.min.js"></script>
9
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
10
  <link rel="preload" href="https://upload.wikimedia.org/wikipedia/commons/5/5e/Visa_Inc._logo.svg" as="image">
11
  <style>
 
39
  transform: translateY(-2px);
40
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
41
  }
42
+ #imageResult {
43
+ transition: all 0.3s ease;
44
+ }
45
+ #generatedImage {
46
+ max-height: 500px;
47
+ object-fit: contain;
48
+ }
49
  </style>
50
  </head>
51
  <body class="bg-gray-50 min-h-screen">
 
60
  <h1 class="text-3xl font-bold text-gray-800 mb-2">
61
  <i class="fas fa-phone-alt text-green-600 mr-2"></i>
62
  بوابة الدفع الآمن
63
+ <button onclick="speakText()" class="ml-2 p-2 rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200">
64
+ <i class="fas fa-volume-up"></i>
65
+ </button>
66
  </h1>
67
  <p class="text-gray-600">أكمل عملية الدفع بكل سهولة وأمان</p>
68
  </header>
69
 
70
+ <!-- Image Generation Section -->
71
+ <div class="max-w-2xl mx-auto bg-white rounded-xl shadow-lg overflow-hidden border border-gray-200 mb-8">
72
+ <div class="bg-purple-600 px-6 py-4">
73
+ <h2 class="text-xl font-bold text-white">إنشاء الصور بالذكاء الاصطناعي</h2>
74
+ </div>
75
+ <div class="px-6 py-6">
76
+ <div class="mb-4">
77
+ <label for="promptInput" class="block text-sm font-medium text-gray-700 mb-2">وصف الصورة المطلوبة</label>
78
+ <textarea id="promptInput" rows="3" class="w-full px-4 py-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-purple-500" placeholder="أدخل وصفًا تفصيليًا للصورة التي تريد إنشائها..."></textarea>
79
+ </div>
80
+ <button id="generateBtn" class="w-full bg-purple-600 text-white py-3 px-4 rounded-md hover:bg-purple-700 transition-colors">
81
+ <i class="fas fa-magic ml-2"></i> إنشاء الصورة
82
+ </button>
83
+
84
+ <div id="imageResult" class="mt-6 hidden">
85
+ <div class="border border-gray-200 rounded-lg p-4">
86
+ <img id="generatedImage" src="" alt="Generated Image" class="w-full rounded">
87
+ </div>
88
+ <button id="downloadBtn" class="mt-4 w-full bg-green-600 text-white py-2 px-4 rounded-md hover:bg-green-700 transition-colors">
89
+ <i class="fas fa-download ml-2"></i> تحميل الصورة
90
+ </button>
91
+ </div>
92
+ </div>
93
+ </div>
94
+
95
  <!-- Payment Form -->
96
  <div class="max-w-2xl mx-auto">
97
  <div class="payment-card rounded-xl shadow-lg overflow-hidden border border-gray-200">
 
350
  </div>
351
 
352
  <script>
353
+ // Image Generation Functionality
354
+ document.getElementById('generateBtn').addEventListener('click', async function() {
355
+ const prompt = document.getElementById('promptInput').value.trim();
356
+ if (!prompt) {
357
+ alert('الرجاء إدخال وصف للصورة');
358
+ return;
359
+ }
360
+
361
+ const generateBtn = this;
362
+ generateBtn.disabled = true;
363
+ generateBtn.innerHTML = '<i class="fas fa-spinner fa-spin ml-2"></i> جاري الإنشاء...';
364
+
365
+ try {
366
+ // Call Qwen-Image-Fast API
367
+ const response = await fetch('https://api.multimodalart.com/qwen-image-fast/generate', {
368
+ method: 'POST',
369
+ headers: {
370
+ 'Content-Type': 'application/json',
371
+ },
372
+ body: JSON.stringify({
373
+ prompt: prompt,
374
+ size: '1024x1024',
375
+ quality: 'standard',
376
+ n: 1
377
+ })
378
+ });
379
+
380
+ if (!response.ok) {
381
+ throw new Error('فشل في إنشاء الصورة');
382
+ }
383
+
384
+ const result = await response.json();
385
+ const imageUrl = result.data[0].url;
386
+
387
+ document.getElementById('generatedImage').src = imageUrl;
388
+ document.getElementById('imageResult').classList.remove('hidden');
389
+
390
+ // Set up download button
391
+ document.getElementById('downloadBtn').onclick = function() {
392
+ const link = document.createElement('a');
393
+ link.href = imageUrl;
394
+ link.download = `generated-image-${Date.now()}.png`;
395
+ document.body.appendChild(link);
396
+ link.click();
397
+ document.body.removeChild(link);
398
+ };
399
+
400
+ } catch (error) {
401
+ console.error('Error:', error);
402
+ alert('حدث خطأ أثناء إنشاء الصورة: ' + error.message);
403
+ } finally {
404
+ generateBtn.disabled = false;
405
+ generateBtn.innerHTML = '<i class="fas fa-magic ml-2"></i> إنشاء الصورة';
406
+ }
407
+ });
408
+
409
  // Copy IBAN function
410
  function copyIBAN() {
411
  const iban = document.getElementById('ibanText').innerText;
 
418
 
419
  // Simple validation and input formatting
420
  document.addEventListener('DOMContentLoaded', function() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
421
  // Visa button and card form handling
422
  const visaBtn = document.getElementById('visaBtn');
423
  const cardForm = document.getElementById('cardForm');
 
483
  <!-- Load Payment Widgets Script -->
484
  <script src="https://test.oppwa.com/v1/paymentWidgets.js?checkoutId=YOUR_CHECKOUT_ID"></script>
485
  <script>
486
+ function speakText() {
487
+ // Get all text content from the page
488
+ const pageText = document.body.innerText;
489
+
490
+ // Configure KittenTTS
491
+ const tts = new KittenTTS({
492
+ voice: 'ar-SA', // Arabic (Saudi Arabia) voice
493
+ rate: 1.0,
494
+ pitch: 1.0
495
+ });
496
+
497
+ // Speak the text
498
+ tts.speak(pageText).catch(err => {
499
+ console.error('TTS Error:', err);
500
+ alert('حدث خطأ في تشغيل الصوت. يرجى المحاولة مرة أخرى.');
501
+ });
502
+ }
503
 
504
+ // Add TTS button to important sections
505
+ document.addEventListener('DOMContentLoaded', function() {
506
+ // Add TTS button to payment sections
507
+ const paymentSections = document.querySelectorAll('.payment-card, .bg-white.rounded-xl');
508
+ paymentSections.forEach(section => {
509
+ const heading = section.querySelector('h2, h3');
510
+ if (heading) {
511
+ const ttsBtn = document.createElement('button');
512
+ ttsBtn.innerHTML = '<i class="fas fa-volume-up"></i>';
513
+ ttsBtn.className = 'ml-2 p-1 rounded-full bg-blue-100 text-blue-600 hover:bg-blue-200 text-sm';
514
+ ttsBtn.onclick = () => {
515
+ const text = section.innerText;
516
+ new KittenTTS({voice: 'ar-SA'}).speak(text);
517
+ };
518
+ heading.appendChild(ttsBtn);
519
+ }
520
+ });
521
  });
522
  </script>
523
  <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Rayan545454/rdddddddd" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>