Spaces:
Configuration error
Configuration error
File size: 620 Bytes
e14dd3f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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() |