Spaces:
Runtime error
Runtime error
camphong24032002
commited on
Commit
·
709b70b
1
Parent(s):
3cd2e35
Test
Browse files- app.py +2 -2
- static/js/script.js +0 -2
app.py
CHANGED
@@ -27,9 +27,9 @@ def df_to_text(df):
|
|
27 |
cols = ["ProductID", "ProductName", "Gender", "Price (INR)", "PrimaryColor"]
|
28 |
for data in df:
|
29 |
for title, col in zip(titles, cols):
|
30 |
-
text.append(concat_content(title, col))
|
31 |
text.append('')
|
32 |
-
return '
|
33 |
|
34 |
|
35 |
df = pd.read_csv("data/dataset.csv").reset_index(drop=True)
|
|
|
27 |
cols = ["ProductID", "ProductName", "Gender", "Price (INR)", "PrimaryColor"]
|
28 |
for data in df:
|
29 |
for title, col in zip(titles, cols):
|
30 |
+
text.append(concat_content(title, data[col]))
|
31 |
text.append('')
|
32 |
+
return '<br>'.join(text)
|
33 |
|
34 |
|
35 |
df = pd.read_csv("data/dataset.csv").reset_index(drop=True)
|
static/js/script.js
CHANGED
@@ -17,7 +17,6 @@
|
|
17 |
};
|
18 |
|
19 |
let get_response = async(msg) => {
|
20 |
-
console.log("Fetching")
|
21 |
const response = await fetch("https://camphong-chatbot.hf.space/chat", {
|
22 |
method: 'POST',
|
23 |
headers: {
|
@@ -27,7 +26,6 @@
|
|
27 |
|
28 |
|
29 |
});
|
30 |
-
console.log("Done")
|
31 |
let json = await response.json();
|
32 |
let message = json.message;
|
33 |
return message.toString();
|
|
|
17 |
};
|
18 |
|
19 |
let get_response = async(msg) => {
|
|
|
20 |
const response = await fetch("https://camphong-chatbot.hf.space/chat", {
|
21 |
method: 'POST',
|
22 |
headers: {
|
|
|
26 |
|
27 |
|
28 |
});
|
|
|
29 |
let json = await response.json();
|
30 |
let message = json.message;
|
31 |
return message.toString();
|