Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -56,16 +56,15 @@ qa_chain = RetrievalQA.from_chain_type(
|
|
56 |
)
|
57 |
|
58 |
# === Step 6: Flask Setup ===
|
59 |
-
app = Flask(__name__
|
60 |
-
CORS(app)
|
61 |
-
|
62 |
# === Step 7: Serve Frontend ===
|
|
|
63 |
@app.route("/")
|
64 |
def index():
|
65 |
-
return render_template("index.html")
|
66 |
|
67 |
-
|
68 |
-
@app.route('/
|
69 |
def chat():
|
70 |
data = request.json
|
71 |
query = data.get('message', '').strip()
|
|
|
56 |
)
|
57 |
|
58 |
# === Step 6: Flask Setup ===
|
59 |
+
app = Flask(__name__)
|
|
|
|
|
60 |
# === Step 7: Serve Frontend ===
|
61 |
+
|
62 |
@app.route("/")
|
63 |
def index():
|
64 |
+
return render_template("index.html") # Make sure chat.html exists
|
65 |
|
66 |
+
|
67 |
+
@app.route('/get', methods=['POST'])
|
68 |
def chat():
|
69 |
data = request.json
|
70 |
query = data.get('message', '').strip()
|