arpit13 commited on
Commit
87b5fad
·
verified ·
1 Parent(s): 8a31d97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -107,9 +107,9 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
107
 
108
  result = gr.Markdown()
109
 
110
- # Fixing the issue by passing the actual inputs (components) and dosha_type as an argument
111
  def create_button(label, dosha_type, fn):
112
- return gr.Button(label, variant="primary").click(fn, inputs=[name, dob, tob, location, tz], outputs=result, params=[dosha_type])
113
 
114
  gr.Markdown("## 🌟 Dosha Analysis")
115
  with gr.Row():
@@ -129,4 +129,3 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
129
  gr.Markdown("### 🔍 Enter your details above and click the relevant button to analyze your astrology report!")
130
 
131
  demo.launch()
132
-
 
107
 
108
  result = gr.Markdown()
109
 
110
+ # Function to create a button with dosha_type as gr.State
111
  def create_button(label, dosha_type, fn):
112
+ return gr.Button(label, variant="primary").click(fn, inputs=[name, dob, tob, location, tz, gr.State(dosha_type)], outputs=result)
113
 
114
  gr.Markdown("## 🌟 Dosha Analysis")
115
  with gr.Row():
 
129
  gr.Markdown("### 🔍 Enter your details above and click the relevant button to analyze your astrology report!")
130
 
131
  demo.launch()