File size: 2,339 Bytes
8216589
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from fastapi import FastAPI, Request
from fastapi.responses import HTMLResponse
from jinja2 import Environment, DictLoader

app = FastAPI()

# Template HTML con tutti i bottoni
templates = {
    "index.html": """
    <!DOCTYPE html>
    <html lang="it">
    <head>
      <meta charset="UTF-8">
      <title>Giorgio's Intelligence</title>
      <style>
        body {
          font-family: 'Segoe UI', sans-serif;
          background: linear-gradient(to right, #1f1c2c, #928dab);
          color: white;
          text-align: center;
          padding: 50px;
        }
        .container {
          background-color: rgba(0,0,0,0.5);
          padding: 30px;
          border-radius: 15px;
          box-shadow: 0 0 20px rgba(255,255,255,0.2);
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
          gap: 20px;
        }
        .button {
          padding: 15px;
          background-color: #ffffff;
          color: #1f1c2c;
          text-decoration: none;
          border-radius: 8px;
          font-weight: bold;
          box-shadow: 0 0 10px rgba(255,255,255,0.3);
          transition: transform 0.2s;
        }
        .button:hover {
          transform: scale(1.05);
        }
      </style>
    </head>
    <body>
      <h1>Giorgio's Intelligence</h1>
      <div class="container">
        <a href="/immagini" class="button">🎨 Genera Immagini</a>
        <a href="/video" class="button">🎥 Genera Video</a>
        <a href="/3d" class="button">🧊 Genera 3D</a>
        <a href="/musica" class="button">🎵 Genera Musica</a>
        <a href="/voce" class="button">🗣️ Sintetizza Voce</a>
        <a href="/grafici" class="button">📊 Crea Grafici</a>
        <a href="/tabelle" class="button">📋 Crea Tabelle</a>
        <a href="/chat" class="button">💬 Conversazione</a>
        <a href="/testo" class="button">✍️ Genera Testo</a>
        <a href="/riassunto" class="button">📚 Riassunto</a>
        <a href="/domande" class="button">❓ Rispondi a Domande</a>
      </div>
    </body>
    </html>
    """
}

env = Environment(loader=DictLoader(templates))

@app.get("/", response_class=HTMLResponse)
async def home(request: Request):
    template = env.get_template("index.html")
    html = template.render()
    return HTMLResponse(content=html)