Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -27,7 +27,6 @@ app = Flask(__name__)
|
|
27 |
cors = CORS(app, always_send=False)
|
28 |
|
29 |
@app.route("/", methods=["GET"])
|
30 |
-
@cross_origin()
|
31 |
def home():
|
32 |
|
33 |
return "Hello Qx!"
|
@@ -53,6 +52,7 @@ def bot():
|
|
53 |
|
54 |
agent = create_pandas_dataframe_agent(llm, df, agent="structured_chat-zero-shot-react-description", verbose=True)
|
55 |
response = agent.run(user_question)
|
|
|
56 |
return jsonify(response)
|
57 |
|
58 |
|
|
|
27 |
cors = CORS(app, always_send=False)
|
28 |
|
29 |
@app.route("/", methods=["GET"])
|
|
|
30 |
def home():
|
31 |
|
32 |
return "Hello Qx!"
|
|
|
52 |
|
53 |
agent = create_pandas_dataframe_agent(llm, df, agent="structured_chat-zero-shot-react-description", verbose=True)
|
54 |
response = agent.run(user_question)
|
55 |
+
response.headers.add('Access-Control-Allow-Origin', '*')
|
56 |
return jsonify(response)
|
57 |
|
58 |
|