Spaces:
Sleeping
Sleeping
File size: 907 Bytes
a3d65ce fa33516 744bcb8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | """
FastAPI application entry point for the Support Ticket Environment.
"""
import os
from openenv.core.env_server.http_server import create_app
from support_ticket_env.models import SupportAction, SupportObservation
from support_ticket_env.server.support_environment import SupportTicketEnvironment
app = create_app(
env=SupportTicketEnvironment,
action_cls=SupportAction,
observation_cls=SupportObservation,
env_name="support_ticket_env",
max_concurrent_envs=4,
)
# Mount our custom Gradio UI at /playground
try:
import gradio as gr
from support_ticket_env.gradio_ui import demo
app = gr.mount_gradio_app(app, demo, path="/playground")
print("Custom Gradio UI mounted at /playground")
except Exception as e:
print(f"Gradio UI not mounted: {e}")
def main():
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=7860)
if __name__ == "__main__":
main() |