Adieee5 commited on
Commit
95fd740
·
verified ·
1 Parent(s): 3a1960e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -56,16 +56,15 @@ qa_chain = RetrievalQA.from_chain_type(
56
  )
57
 
58
  # === Step 6: Flask Setup ===
59
- app = Flask(__name__, static_folder="static", template_folder="templates")
60
- CORS(app)
61
-
62
  # === Step 7: Serve Frontend ===
 
63
  @app.route("/")
64
  def index():
65
- return render_template("index.html")
66
 
67
- # === Step 8: API Endpoint ===
68
- @app.route('/api/chat', methods=['POST'])
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()