From a1991e36b5aedfdec0fdbde84fdbe70cb97d29d2 Mon Sep 17 00:00:00 2001 From: Abubakar Abid Date: Tue, 28 Dec 2021 18:10:37 -0600 Subject: [PATCH] minor cleanups --- gradio/app.py | 14 ++++++++++++++ gradio/networking.py | 15 --------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/gradio/app.py b/gradio/app.py index 785e73a6e2..f1095585b6 100644 --- a/gradio/app.py +++ b/gradio/app.py @@ -106,6 +106,20 @@ async def flag(request: Request): return {'success': True} +# @app.route("/api/interpret/", methods=["POST"]) +# #@login_check +# def interpret(): +# log_feature_analytics('interpret') +# raw_input = request.json["data"] +# interpretation_scores, alternative_outputs = app.interface.interpret( +# raw_input) +# return jsonify({ +# "interpretation_scores": interpretation_scores, +# "alternative_outputs": alternative_outputs +# }) + + + ######## # Helper functions ######## diff --git a/gradio/networking.py b/gradio/networking.py index 368d3167eb..cdde685a25 100644 --- a/gradio/networking.py +++ b/gradio/networking.py @@ -189,21 +189,6 @@ def shutdown(): return "Shutting down..." - - -@app.route("/api/interpret/", methods=["POST"]) -#@login_check -def interpret(): - log_feature_analytics('interpret') - raw_input = request.json["data"] - interpretation_scores, alternative_outputs = app.interface.interpret( - raw_input) - return jsonify({ - "interpretation_scores": interpretation_scores, - "alternative_outputs": alternative_outputs - }) - - @app.route("/file/", methods=["GET"]) #@login_check def file(path):