Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
|
4 |
-
def check_mangal_dosh(name, dob, tob, lat, lon, tz
|
5 |
-
|
|
|
6 |
response = requests.get(url)
|
7 |
|
8 |
if response.status_code == 200:
|
@@ -43,11 +44,10 @@ with gr.Blocks() as demo:
|
|
43 |
lat = gr.Number(label="Latitude")
|
44 |
lon = gr.Number(label="Longitude")
|
45 |
tz = gr.Number(label="Time Zone (e.g., 5.5)")
|
46 |
-
api_key = gr.Textbox(label="API Key", type="password")
|
47 |
|
48 |
submit_btn = gr.Button("Check Mangal Dosh")
|
49 |
result = gr.Markdown()
|
50 |
|
51 |
-
submit_btn.click(check_mangal_dosh, inputs=[name, dob, tob, lat, lon, tz
|
52 |
|
53 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import requests
|
3 |
|
4 |
+
def check_mangal_dosh(name, dob, tob, lat, lon, tz):
|
5 |
+
API_KEY = "d6cf6f2e-301e-5f63-a988-b0a3aefd0896"
|
6 |
+
url = f"https://api.vedicastroapi.com/v3-json/dosha/mangal-dosh?dob={dob}&tob={tob}&lat={lat}&lon={lon}&tz={tz}&api_key={API_KEY}&lang=en"
|
7 |
response = requests.get(url)
|
8 |
|
9 |
if response.status_code == 200:
|
|
|
44 |
lat = gr.Number(label="Latitude")
|
45 |
lon = gr.Number(label="Longitude")
|
46 |
tz = gr.Number(label="Time Zone (e.g., 5.5)")
|
|
|
47 |
|
48 |
submit_btn = gr.Button("Check Mangal Dosh")
|
49 |
result = gr.Markdown()
|
50 |
|
51 |
+
submit_btn.click(check_mangal_dosh, inputs=[name, dob, tob, lat, lon, tz], outputs=result)
|
52 |
|
53 |
demo.launch()
|