salehalmansour commited on
Commit
13a3bbb
1 Parent(s): ec93565

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +22 -24
templates/index.html CHANGED
@@ -1,35 +1,33 @@
1
  <!DOCTYPE html>
2
- <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>App</title>
7
- <script src="https://cdn.jsdelivr.net/npm/@tensorflow/tfjs"></script>
8
  </head>
9
  <body>
10
- <h3>نموذج توليد الصور</h3>
11
- <h3>اكتب وصف للصورة التي تود من النظام التوليدي انشاءها</h3>
12
-
13
- <div>
14
- <label for="prompt">Prompt:</label>
15
- <input type="text" id="prompt" name="prompt">
16
- <button onclick="generateImage()">Generate Image</button>
17
- </div>
18
-
19
- <div id="output"></div>
20
-
21
  <script>
22
  async function generateImage() {
23
- const prompt = document.getElementById('prompt').value;
24
-
25
- // Dummy implementation for demonstration
26
- // Replace this with actual code if available in JavaScript
27
- // Dummy image generation code
28
- const dummyImage = document.createElement('img');
29
- dummyImage.src = 'https://via.placeholder.com/400x400'; // Placeholder image URL
30
-
31
- document.getElementById('output').innerHTML = ''; // Clear previous output
32
- document.getElementById('output').appendChild(dummyImage);
33
  }
34
  </script>
35
  </body>
 
1
  <!DOCTYPE html>
2
+ <html lang="ar">
3
  <head>
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>نموذج توليد الصور</title>
 
7
  </head>
8
  <body>
9
+ <header>
10
+ <img src="path_to_your_logo.png" alt="شعار الموقع">
11
+ </header>
12
+ <main>
13
+ <h1>نموذج توليد الصور</h1>
14
+ <p>اكتب وصف للصورة التي تود من النظام التوليدي انشاءها</p>
15
+ <div>
16
+ <button onclick="generateImage()">انشئ</button>
17
+ </div>
18
+ <div id="output"></div>
19
+ </main>
20
  <script>
21
  async function generateImage() {
22
+ const text = prompt("أدخل النص الذي تريد إدراجه في الصورة:");
23
+ if (text) {
24
+ const dummyImage = document.createElement('img');
25
+ dummyImage.src = `https://via.placeholder.com/400x400?text=${encodeURIComponent(text)}`;
26
+ document.getElementById('output').innerHTML = '';
27
+ document.getElementById('output').appendChild(dummyImage);
28
+ } else {
29
+ alert("يرجى إدخال نص للصورة!");
30
+ }
 
31
  }
32
  </script>
33
  </body>