arpit13 commited on
Commit
14f1d8b
·
verified ·
1 Parent(s): e298271

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -11
app.py CHANGED
@@ -106,10 +106,11 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
106
  tz = gr.Number(label="Timezone (e.g., 5.5 for India)", value=5.5)
107
 
108
  result = gr.Markdown()
109
-
 
110
  def create_button(label, dosha_type, fn):
111
- return gr.Button(label, variant="primary").click(fn, inputs=[dosha_type, name, dob, tob, location, tz], outputs=result)
112
-
113
  gr.Markdown("## 🌟 Dosha Analysis")
114
  with gr.Row():
115
  create_button("Mangal Dosh", "mangal-dosh", check_dosha)
@@ -124,14 +125,6 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
124
  create_button("Mahadasha Predictions", "maha-dasha-predictions", check_dasha)
125
  create_button("Antardasha", "antar-dasha", check_dasha)
126
  create_button("Char Dasha Current", "char-dasha-current", check_dasha)
127
- create_button("Char Dasha Main", "char-dasha-main", check_dasha)
128
- create_button("Char Dasha Sub", "char-dasha-sub", check_dasha)
129
- create_button("Current Mahadasha Full", "current-mahadasha-full", check_dasha)
130
- create_button("Current Mahadasha", "current-mahadasha", check_dasha)
131
- create_button("Paryantar Dasha", "paryantar-dasha", check_dasha)
132
- create_button("Specific Dasha", "specific-sub-dasha", check_dasha)
133
- create_button("Yogini Dasha Main", "yogini-dasha-main", check_dasha)
134
- create_button("Yogini Dasha Sub", "yogini-dasha-sub", check_dasha)
135
 
136
  gr.Markdown("### 🔍 Enter your details above and click the relevant button to analyze your astrology report!")
137
 
 
106
  tz = gr.Number(label="Timezone (e.g., 5.5 for India)", value=5.5)
107
 
108
  result = gr.Markdown()
109
+
110
+ # Fixing the issue by passing the actual inputs (components) and dosha_type
111
  def create_button(label, dosha_type, fn):
112
+ return gr.Button(label, variant="primary").click(fn, inputs=[name, dob, tob, location, tz, dosha_type], outputs=result)
113
+
114
  gr.Markdown("## 🌟 Dosha Analysis")
115
  with gr.Row():
116
  create_button("Mangal Dosh", "mangal-dosh", check_dosha)
 
125
  create_button("Mahadasha Predictions", "maha-dasha-predictions", check_dasha)
126
  create_button("Antardasha", "antar-dasha", check_dasha)
127
  create_button("Char Dasha Current", "char-dasha-current", check_dasha)
 
 
 
 
 
 
 
 
128
 
129
  gr.Markdown("### 🔍 Enter your details above and click the relevant button to analyze your astrology report!")
130