Feri007 commited on
Commit
677a430
·
verified ·
1 Parent(s): 76c074b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +48 -3
app.py CHANGED
@@ -1,11 +1,56 @@
1
  import gradio as gr
2
  import os
3
 
4
- demo = gr.load(
5
- "spaces/Feri007/GIapp-private",
6
- hf_token=os.environ.get("HF_TOKEN")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  )
8
 
 
 
 
 
 
 
9
 
10
  if __name__ == "__main__":
11
  demo.launch()
 
 
1
  import gradio as gr
2
  import os
3
 
4
+ # 1️⃣ تمام استایل‌های جادویی (CSS) را اینجا دوباره تعریف می‌کنیم
5
+ CUSTOM_CSS = """
6
+ @import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
7
+ body, .gradio-container {
8
+ font-family: 'Vazirmatn', Tahoma, sans-serif !important;
9
+ background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
10
+ background-attachment: fixed !important;
11
+ }
12
+ .glass-panel {
13
+ background: rgba(255, 255, 255, 0.85) !important;
14
+ backdrop-filter: blur(16px) !important;
15
+ -webkit-backdrop-filter: blur(16px) !important;
16
+ border-radius: 20px !important;
17
+ border: 1px solid rgba(255, 255, 255, 0.6) !important;
18
+ box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1) !important;
19
+ padding: 25px !important;
20
+ margin-bottom: 25px !important;
21
+ transition: transform 0.3s ease, box-shadow 0.3s ease !important;
22
+ }
23
+ .glass-panel:hover {
24
+ box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.15) !important;
25
+ }
26
+ .login-box { max-width: 450px !important; margin: 80px auto !important; text-align: center; }
27
+ .header-text { background: linear-gradient(45deg, #1565c0, #00acc1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900; text-align: center; font-size: 2.2em; margin-bottom: 5px; }
28
+ .primary-btn { background: linear-gradient(45deg, #1b6ca8, #4facfe) !important; border: none !important; color: white !important; font-weight: bold !important; font-size: 16px !important; border-radius: 12px !important; box-shadow: 0 4px 15px rgba(27,108,168,0.3) !important; transition: all 0.3s ease !important; }
29
+ .primary-btn:hover { transform: translateY(-2px) !important; box-shadow: 0 8px 25px rgba(27,108,168,0.5) !important; }
30
+ .secondary-btn { border-radius: 12px !important; transition: all 0.3s ease !important; background: white !important; color: #1b6ca8 !important; border: 2px solid #1b6ca8 !important; }
31
+ .secondary-btn:hover { background: #f0f8ff !important; transform: translateY(-2px) !important; }
32
+ .section-title { color: #0f172a; font-weight: bold; border-bottom: 2px solid #e2e8f0; padding-bottom: 10px; margin-bottom: 20px; }
33
+ textarea, input { border-radius: 12px !important; border: 1px solid #cbd5e1 !important; }
34
+ textarea:focus, input:focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,0.2) !important; }
35
+ .tabs { background: transparent !important; border: none !important; }
36
+ .tab-nav { border-bottom: 2px solid #e2e8f0 !important; margin-bottom: 15px !important; }
37
+ .tab-nav button.selected { color: #1b6ca8 !important; border-bottom: 3px solid #1b6ca8 !important; font-weight: bold !important; }
38
+ """
39
+
40
+ # 2️⃣ تم رنگی را دوباره می‌سازیم
41
+ theme = gr.themes.Soft(
42
+ primary_hue="blue",
43
+ secondary_hue="cyan",
44
+ font=[gr.themes.GoogleFont("Vazirmatn"), "Arial", "sans-serif"]
45
  )
46
 
47
+ # 3️⃣ اسپیس پرایوت را لود می‌کنیم و استایل‌ها را به آن تزریق می‌کنیم
48
+ with gr.Blocks(theme=theme, css=CUSTOM_CSS) as demo:
49
+ gr.load(
50
+ "spaces/Feri007/GIapp-private",
51
+ hf_token=os.environ.get("HF_TOKEN")
52
+ )
53
 
54
  if __name__ == "__main__":
55
  demo.launch()
56
+