sds-bosch commited on
Commit
d071b05
1 Parent(s): 6a0d729

Update content type

Browse files
Files changed (1) hide show
  1. index.html +2 -2
index.html CHANGED
@@ -136,7 +136,7 @@
136
  // Make a POST request to the chatbot API
137
  const response = await fetch("https://sds-bosch-movadoapi.hf.space/predict", {
138
  method: "POST",
139
- headers: { "Content-Type": "application/json" },
140
  body: JSON.stringify({
141
  input_text: [input],
142
  })
@@ -144,7 +144,7 @@
144
 
145
  // Extract the chatbot response from the JSON data
146
  const data = await response.json();
147
- const responseText = data.data[0];
148
 
149
  // Update the output textarea with the chatbot response
150
  $('.message.loading').remove();
 
136
  // Make a POST request to the chatbot API
137
  const response = await fetch("https://sds-bosch-movadoapi.hf.space/predict", {
138
  method: "POST",
139
+ headers: { "Content-Type": "text/plain" },
140
  body: JSON.stringify({
141
  input_text: [input],
142
  })
 
144
 
145
  // Extract the chatbot response from the JSON data
146
  const data = await response.json();
147
+ const responseText = data.data;
148
 
149
  // Update the output textarea with the chatbot response
150
  $('.message.loading').remove();