# app.py import gradio as gr from daily import fetch_daily from intraday import fetch_intraday from info import fetch_info from qresult import fetch_qresult from result import fetch_result from balance import fetch_balance from cashflow import fetch_cashflow from dividend import fetch_dividend from split import fetch_split from other import fetch_other # --- Main UI function --- def fetch_data(symbol, req_type): req_type = req_type.lower() if req_type == "daily": return fetch_daily(symbol,"NSE") elif req_type == "intraday": return fetch_intraday(symbol) elif req_type == "info": return fetch_info(symbol) elif req_type == "qresult": return fetch_qresult(symbol) elif req_type == "result": return fetch_result(symbol) elif req_type == "balance": return fetch_balance(symbol) elif req_type == "cashflow": return fetch_cashflow(symbol) elif req_type == "dividend": return fetch_dividend(symbol) elif req_type == "split": return fetch_split(symbol) elif req_type == "other": return fetch_other(symbol) else: return f"