Spaces:
Running
Running
Rohit Ghosh
commited on
Commit
·
b45a0d5
1
Parent(s):
aeea182
something
Browse files- app.py +2 -1
- requirements.txt +2 -0
- script.js +2 -4
app.py
CHANGED
@@ -15,4 +15,5 @@ def get_response():
|
|
15 |
return jsonify(response)
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
-
app.run(debug=True)
|
|
|
|
15 |
return jsonify(response)
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
+
app.run(host="0.0.0.0", port=7860, debug=True)
|
19 |
+
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
flask
|
2 |
+
flask_cors
|
script.js
CHANGED
@@ -9,11 +9,9 @@ async function sendMessage() {
|
|
9 |
userInput.value = "";
|
10 |
|
11 |
// Send message to the server
|
12 |
-
const response = await fetch("
|
13 |
method: "POST",
|
14 |
-
headers: {
|
15 |
-
"Content-Type": "application/json",
|
16 |
-
},
|
17 |
body: JSON.stringify({ message }),
|
18 |
});
|
19 |
|
|
|
9 |
userInput.value = "";
|
10 |
|
11 |
// Send message to the server
|
12 |
+
const response = await fetch("/get_response", {
|
13 |
method: "POST",
|
14 |
+
headers: { "Content-Type": "application/json" },
|
|
|
|
|
15 |
body: JSON.stringify({ message }),
|
16 |
});
|
17 |
|