Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
from flask import Flask, request, Response, jsonify
|
2 |
from huggingface_hub import InferenceClient
|
|
|
3 |
|
4 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
5 |
|
@@ -40,6 +41,7 @@ def generate(
|
|
40 |
# yield response.token.text.encode('utf-8')
|
41 |
|
42 |
app = Flask(__name__)
|
|
|
43 |
|
44 |
@app.route('/health', methods=['GET'])
|
45 |
def health():
|
|
|
1 |
from flask import Flask, request, Response, jsonify
|
2 |
from huggingface_hub import InferenceClient
|
3 |
+
from flask_cors import CORS
|
4 |
|
5 |
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
6 |
|
|
|
41 |
# yield response.token.text.encode('utf-8')
|
42 |
|
43 |
app = Flask(__name__)
|
44 |
+
CORS(app)
|
45 |
|
46 |
@app.route('/health', methods=['GET'])
|
47 |
def health():
|