AGENTIC_InsurTech / run_app.py
designfailure's picture
Upload 17 files
e14dd3f verified
raw
history blame contribute delete
620 Bytes
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--interface', type=str, choices=['gradio', 'streamlit'],
default='gradio', help='Izbira uporabniškega vmesnika')
args = parser.parse_args()
if args.interface == 'gradio':
from gradio_app import create_interface
app = create_interface()
app.launch(share=True)
else:
import streamlit.cli as stcli
import sys
sys.argv = ["streamlit", "run", "streamlit_app.py"]
stcli.main()
if __name__ == "__main__":
main()