iris / app.py
AymenKallala's picture
Initial commit
baa274b
Raw History Blame Contribute Delete
551 Bytes
"""Hugging Face Gradio entry point for Iris."""
import os
import pathlib
from backend import web
if __name__ == '__main__':
port = int(os.environ.get('GRADIO_SERVER_PORT', '7860'))
app = web.create_app(
pathlib.Path(__file__).parent / 'frontend/dist',
os.environ['BEAM_URL'],
os.environ.get('BEAM_URL_TOKEN'),
score_url=os.environ.get('IRIS_BEAM_SCORE_URL'),
)
app.launch(
server_name=os.environ.get('GRADIO_SERVER_NAME', '0.0.0.0'),
server_port=port,
share=False,
ssr_mode=False,
run_history=False,
)