rcajegas commited on
Commit
7ee5cb2
·
1 Parent(s): 9c7c30a

Update style.css

Browse files
Files changed (1) hide show
  1. style.css +64 -24
style.css CHANGED
@@ -1,28 +1,68 @@
1
- body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
4
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
- }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
- }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
- }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
28
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Goals of the World Health Organization</title>
5
+ <script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tf.min.js"></script>
6
+ <script src="https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/dist/transformers.min.js"></script>
7
+ <style>
8
+ /* Set the background color and add a 3D effect */
9
+ body {
10
+ background-color: #2196F3;
11
+ background-image: linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
12
+ linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px),
13
+ linear-gradient(rgba(255,255,255,0.2) 1px, transparent 1px),
14
+ linear-gradient(90deg, rgba(255,255,255,0.2) 1px, transparent 1px);
15
+ background-size: 30px 30px, 30px 30px, 15px 15px, 15px 15px;
16
+ background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
17
+ }
18
+ /* Center the content */
19
+ #content {
20
+ margin: 0 auto;
21
+ max-width: 800px;
22
+ text-align: center;
23
+ }
24
+ /* Add some padding to the content */
25
+ #goals {
26
+ padding: 30px;
27
+ }
28
+ /* Add a border to the GIF */
29
+ #gif {
30
+ border: 5px solid white;
31
+ }
32
+ </style>
33
+ <script>
34
+ async function generateGoals() {
35
+ // Load the GPT-2 model
36
+ const model = await transformers.gpt2.GPT2Model.fromPretrained("gpt2");
37
 
38
+ // Set up the tokenizer
39
+ const tokenizer = await transformers.gpt2.GPT2Tokenizer.fromPretrained("gpt2");
 
 
40
 
41
+ // Define the input text
42
+ const input = "The goals of the World Health Organization are";
 
 
 
 
43
 
44
+ // Encode the input text
45
+ const encodedInput = tokenizer.encode(input);
 
 
 
 
 
46
 
47
+ // Generate the output text using the GPT-2 model
48
+ const output = await model.generate(tf.tensor2d(encodedInput, [1, encodedInput.length]), { maxOutputLength: 200 });
49
+
50
+ // Decode the output text
51
+ const decodedOutput = tokenizer.decode(output.arraySync()[0], { skipSpecialTokens: true });
52
+
53
+ // Display the output text and link to the WHO website in the HTML page
54
+ document.getElementById("goals").innerHTML = decodedOutput;
55
+ document.getElementById("wholink").href = "https://www.who.int/about/mission/en/";
56
+ }
57
+ </script>
58
+ </head>
59
+ <body onload="generateGoals()">
60
+ <div id="content">
61
+ <h1>Goals of the World Health Organization</h1>
62
+ <p id="goals">Loading...</p>
63
+ <img id="gif" src="https://media.giphy.com/media/l0MYt5jPR6QX5pnqM/giphy.gif" alt="GIF design">
64
+ <br>
65
+ <a id="wholink" href="#">Learn more about the WHO</a>
66
+ </div>
67
+ </body>
68
+ </html>