Ifeanyi commited on
Commit
5bbf562
·
verified ·
1 Parent(s): eee2d20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -49
app.py CHANGED
@@ -23,61 +23,15 @@ def arithmetic(num1, num2, operation):
23
  res = robj.r(f"div({num1}, {num2})")
24
  return res[0]
25
 
26
- # Custom CSS for better theme
27
- custom_css = """
28
- body {
29
- background-color: #121212;
30
- color: #ffffff;
31
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
32
- }
33
 
34
- /* Inputs and selects */
35
- input, textarea, select {
36
- background-color: #1e1e1e;
37
- color: #ffffff;
38
- border: 1px solid #555;
39
- border-radius: 6px;
40
- padding: 8px;
41
- }
42
-
43
- /* Radio buttons */
44
- label input[type="radio"] {
45
- accent-color: #3b82f6;
46
- }
47
-
48
- /* Buttons */
49
- button {
50
- background: linear-gradient(135deg, #3b82f6, #0f4c81);
51
- color: white;
52
- border: none;
53
- border-radius: 6px;
54
- padding: 10px 20px;
55
- cursor: pointer;
56
- transition: background 0.3s ease;
57
- }
58
- button:hover {
59
- background: linear-gradient(135deg, #60a5fa, #2563eb);
60
- }
61
-
62
- /* Center heading text */
63
- h1, h3 {
64
- text-align: center;
65
- color: #ffffff;
66
- }
67
-
68
- /* Hide footer */
69
- footer {
70
- display: none !important;
71
- }
72
- """
73
 
74
  with gr.Blocks(
75
  title="R-Powered Calculator",
76
- theme=gr.themes.Base(),
77
- css=custom_css
78
  ) as app:
79
  gr.HTML(
80
- "<h1><strong>R-Powered Calculator</strong></h1>"
81
  )
82
  with gr.Row():
83
  num1 = gr.Number(label="Number 1")
 
23
  res = robj.r(f"div({num1}, {num2})")
24
  return res[0]
25
 
 
 
 
 
 
 
 
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  with gr.Blocks(
29
  title="R-Powered Calculator",
30
+ theme=gr.themes.Monochrome(),
31
+ css="footer {display: none !important;}"
32
  ) as app:
33
  gr.HTML(
34
+ "<h1 style='text-align:center;'><strong>R-Powered Calculator</strong></h1>"
35
  )
36
  with gr.Row():
37
  num1 = gr.Number(label="Number 1")