mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
add flask cors
This commit is contained in:
parent
48666ca442
commit
1dca0c4029
@ -6,6 +6,7 @@ import os
|
||||
import socket
|
||||
import threading
|
||||
from flask import Flask, request, jsonify, abort, send_file, render_template
|
||||
from flask_cors import CORS
|
||||
import threading
|
||||
import pkg_resources
|
||||
from distutils import dir_util
|
||||
@ -35,6 +36,7 @@ app = Flask(__name__,
|
||||
template_folder=STATIC_TEMPLATE_LIB,
|
||||
static_folder=None) # TODO (aliabid94): replace with default static
|
||||
# handler
|
||||
CORS(app)
|
||||
app.app_globals = {}
|
||||
|
||||
# Hide Flask default message
|
||||
|
@ -1,6 +1,7 @@
|
||||
numpy
|
||||
requests
|
||||
flask
|
||||
flask-cors
|
||||
paramiko
|
||||
scipy
|
||||
IPython
|
||||
|
@ -6,6 +6,7 @@ import os
|
||||
import socket
|
||||
import threading
|
||||
from flask import Flask, request, jsonify, abort, send_file, render_template
|
||||
from flask_cors import CORS
|
||||
import threading
|
||||
import pkg_resources
|
||||
from distutils import dir_util
|
||||
@ -35,6 +36,7 @@ app = Flask(__name__,
|
||||
template_folder=STATIC_TEMPLATE_LIB,
|
||||
static_folder=None) # TODO (aliabid94): replace with default static
|
||||
# handler
|
||||
CORS(app)
|
||||
app.app_globals = {}
|
||||
|
||||
# Hide Flask default message
|
||||
|
Loading…
Reference in New Issue
Block a user