tanmaivan commited on
Commit
787bc91
·
1 Parent(s): 22def43

fix: update frontend api base url to production backend endpoint

Browse files
FrontEnd/src/ChatBot.css CHANGED
@@ -8,15 +8,12 @@
8
  /* Container */
9
  .chatbot-container {
10
  width: 100%;
11
- max-width: 900px;
12
- height: 95vh;
13
- margin: 2.5vh auto;
14
  display: flex;
15
  flex-direction: column;
16
  background-color: #ffffff;
17
- border-radius: 16px;
18
- box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
19
- overflow: hidden;
20
  position: relative;
21
  font-family: 'Inter', sans-serif;
22
  color: #374151;
@@ -29,8 +26,9 @@
29
  align-items: center;
30
  padding: 16px 24px;
31
  background-color: #ffffff;
32
- border-bottom: 1px solid #e5e7eb;
33
- z-index: 10;
 
34
  }
35
 
36
  .header-logo {
@@ -269,18 +267,16 @@
269
  .input-area {
270
  padding: 16px 24px 24px 24px;
271
  background-color: #ffffff;
272
- background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 20%);
273
  }
274
 
275
  .input-container {
276
  display: flex;
277
  align-items: flex-end;
278
  background-color: #ffffff;
279
- border: 1px solid #d1d5db;
280
  border-radius: 16px;
281
- box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
282
  padding: 4px;
283
- transition: border-color 0.2s, box-shadow 0.2s;
284
  position: relative;
285
  }
286
 
 
8
  /* Container */
9
  .chatbot-container {
10
  width: 100%;
11
+ max-width: 1000px;
12
+ height: 100vh;
13
+ margin: 0 auto;
14
  display: flex;
15
  flex-direction: column;
16
  background-color: #ffffff;
 
 
 
17
  position: relative;
18
  font-family: 'Inter', sans-serif;
19
  color: #374151;
 
26
  align-items: center;
27
  padding: 16px 24px;
28
  background-color: #ffffff;
29
+ position: sticky;
30
+ top: 0;
31
+ z-index: 100;
32
  }
33
 
34
  .header-logo {
 
267
  .input-area {
268
  padding: 16px 24px 24px 24px;
269
  background-color: #ffffff;
 
270
  }
271
 
272
  .input-container {
273
  display: flex;
274
  align-items: flex-end;
275
  background-color: #ffffff;
276
+ border: 1px solid #e5e7eb;
277
  border-radius: 16px;
 
278
  padding: 4px;
279
+ transition: all 0.2s;
280
  position: relative;
281
  }
282
 
FrontEnd/src/ChatBot.jsx CHANGED
@@ -3,6 +3,8 @@ import { FaUser, FaRobot, FaPaperPlane, FaCircle, FaPlus, FaPizzaSlice } from "r
3
  import ReactMarkdown from "react-markdown";
4
  import "./ChatBot.css";
5
 
 
 
6
  const ChatBot = () => {
7
  const [messages, setMessages] = useState([]);
8
  const [userInput, setUserInput] = useState("");
@@ -42,7 +44,7 @@ const ChatBot = () => {
42
  }
43
 
44
  try {
45
- const response = await fetch("http://127.0.0.1:8000/process_query_stream/", {
46
  method: "POST",
47
  headers: {
48
  "Content-Type": "application/json",
@@ -98,7 +100,7 @@ const ChatBot = () => {
98
  setMessages([]);
99
  setIsLoading(false); // Reset loading state
100
  try {
101
- const response = await fetch("http://127.0.0.1:8000/newchat/", {
102
  method: "GET",
103
  });
104
 
 
3
  import ReactMarkdown from "react-markdown";
4
  import "./ChatBot.css";
5
 
6
+ const BASE_URL = "https://hutmind.onrender.com";
7
+
8
  const ChatBot = () => {
9
  const [messages, setMessages] = useState([]);
10
  const [userInput, setUserInput] = useState("");
 
44
  }
45
 
46
  try {
47
+ const response = await fetch(`${BASE_URL}/process_query_stream/`, {
48
  method: "POST",
49
  headers: {
50
  "Content-Type": "application/json",
 
100
  setMessages([]);
101
  setIsLoading(false); // Reset loading state
102
  try {
103
+ const response = await fetch(`${BASE_URL}/newchat/`, {
104
  method: "GET",
105
  });
106
 
FrontEnd/src/index.css CHANGED
@@ -3,20 +3,16 @@
3
  body {
4
  margin: 0;
5
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
6
- display: flex;
7
- justify-content: center;
8
- align-items: center;
9
- min-height: 100vh;
10
- background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
11
  color: #111827;
12
  -webkit-font-smoothing: antialiased;
13
  -moz-osx-font-smoothing: grayscale;
 
14
  }
15
 
16
  #root {
17
  width: 100%;
18
- height: 100vh;
19
  display: flex;
20
- justify-content: center;
21
- align-items: center;
22
  }
 
3
  body {
4
  margin: 0;
5
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
6
+ background-color: #ffffff;
 
 
 
 
7
  color: #111827;
8
  -webkit-font-smoothing: antialiased;
9
  -moz-osx-font-smoothing: grayscale;
10
+ overscroll-behavior: none;
11
  }
12
 
13
  #root {
14
  width: 100%;
15
+ min-height: 100vh;
16
  display: flex;
17
+ flex-direction: column;
 
18
  }