Offex commited on
Commit
a48731c
Β·
verified Β·
1 Parent(s): 4677ad4

Rename index.html to app py

Browse files
Files changed (2) hide show
  1. app py +40 -0
  2. index.html +0 -18
app py ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from datetime import datetime
3
+ from zoneinfo import ZoneInfo
4
+
5
+ def get_times():
6
+
7
+ zones = {
8
+ "πŸ—½ New York": "America/New_York",
9
+ "🀠 Texas": "America/Chicago",
10
+ "πŸ” Denver": "America/Denver",
11
+ "🌴 California": "America/Los_Angeles",
12
+ "❄ Alaska": "America/Anchorage",
13
+ "🌺 Hawaii": "Pacific/Honolulu"
14
+ }
15
+
16
+ text = "πŸ‡ΊπŸ‡Έ USA LIVE CLOCK\n\n"
17
+
18
+ for city, zone in zones.items():
19
+ now = datetime.now(ZoneInfo(zone))
20
+
21
+ text += (
22
+ f"{city}\n"
23
+ f"⏰ Time : {now.strftime('%I:%M:%S %p')}\n"
24
+ f"πŸ“… Date : {now.strftime('%d-%m-%Y')}\n"
25
+ f"πŸ“† Day : {now.strftime('%A')}\n\n"
26
+ )
27
+
28
+ return text
29
+
30
+ with gr.Blocks() as demo:
31
+ gr.Markdown("# πŸ‡ΊπŸ‡Έ USA Digital Clock")
32
+ output = gr.Textbox(lines=30, label="Live Time")
33
+
34
+ demo.load(
35
+ get_times,
36
+ outputs=output,
37
+ every=1
38
+ )
39
+
40
+ demo.launch()
index.html DELETED
@@ -1,18 +0,0 @@
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>11Labs iFrame Test</title>
7
- <style>
8
- body { margin: 0; padding: 0; height: 100vh; overflow: hidden; background-color: #f4f4f9; }
9
- iframe { width: 100%; height: 100%; border: none; }
10
- .warning { text-align: center; padding: 10px; background: #ffcc00; font-family: Arial, sans-serif; font-weight: bold; }
11
- </style>
12
- </head>
13
- <body>
14
- <div class="warning">Agar niche screen blank hai, toh iska matlab ElevenLabs ne security ke kaaran iframe block kar diya hai.</div>
15
-
16
- <iframe src="https://elevenlabs.io/"></iframe>
17
- </body>
18
- </html>