diff --git a/gradio/app.py b/gradio/app.py index 7795ef15ca..d7096a72cb 100644 --- a/gradio/app.py +++ b/gradio/app.py @@ -114,13 +114,7 @@ def static_resource(path: str): raise HTTPException(status_code=404, detail="Static file not found") -def get_config(): - # if app.interface.auth is None or current_user.is_authenticated: - return app.interface.config - # else: - # return {"auth_required": True, "auth_message": app.interface.auth_message} - - +@app.get("/api", response_class=HTMLResponse) # Needed for Spaces @app.get("/api/", response_class=HTMLResponse) def api_docs(request: Request): inputs = [type(inp) for inp in app.interface.input_components] diff --git a/gradio/networking.py b/gradio/networking.py index 3cec9a7cc2..5ee66229b9 100644 --- a/gradio/networking.py +++ b/gradio/networking.py @@ -35,9 +35,6 @@ LOCALHOST_NAME = os.getenv('GRADIO_SERVER_NAME', "127.0.0.1") GRADIO_API_SERVER = "https://api.gradio.app/v1/tunnel-request" -# app.url_map.strict_slashes = False # TODO: go back to discussion with Charles - - def get_first_available_port( initial: int, final: int) -> int: