Sibi Krishnamoorthy commited on
Commit ·
5ce04dd
1
Parent(s): 00367b3
fix internal route
Browse files
frontend/src/App.js
CHANGED
|
@@ -124,7 +124,7 @@ function App() {
|
|
| 124 |
|
| 125 |
try {
|
| 126 |
setIsLoading(true);
|
| 127 |
-
const response = await axios.post('http://
|
| 128 |
headers: { 'Content-Type': 'multipart/form-data' }
|
| 129 |
});
|
| 130 |
|
|
@@ -174,7 +174,7 @@ function App() {
|
|
| 174 |
setIsLoading(true);
|
| 175 |
|
| 176 |
try {
|
| 177 |
-
const response = await axios.post('http://
|
| 178 |
query: userMessage,
|
| 179 |
file_path: uploadedFile?.path || null
|
| 180 |
});
|
|
|
|
| 124 |
|
| 125 |
try {
|
| 126 |
setIsLoading(true);
|
| 127 |
+
const response = await axios.post('http://0.0.0.0:7860/upload', formData, {
|
| 128 |
headers: { 'Content-Type': 'multipart/form-data' }
|
| 129 |
});
|
| 130 |
|
|
|
|
| 174 |
setIsLoading(true);
|
| 175 |
|
| 176 |
try {
|
| 177 |
+
const response = await axios.post('http://0.0.0.0:7860/chat', {
|
| 178 |
query: userMessage,
|
| 179 |
file_path: uploadedFile?.path || null
|
| 180 |
});
|
frontend/src/components/StorageManager.js
CHANGED
|
@@ -10,7 +10,7 @@ const StorageManager = () => {
|
|
| 10 |
const fetchStorageInfo = async () => {
|
| 11 |
setLoading(true);
|
| 12 |
try {
|
| 13 |
-
const response = await axios.get('http://
|
| 14 |
setStorageInfo(response.data);
|
| 15 |
setMessage('');
|
| 16 |
} catch (error) {
|
|
@@ -24,7 +24,7 @@ const StorageManager = () => {
|
|
| 24 |
const handleCleanup = async () => {
|
| 25 |
setLoading(true);
|
| 26 |
try {
|
| 27 |
-
const response = await axios.post(`http://
|
| 28 |
setMessage(response.data.message);
|
| 29 |
fetchStorageInfo(); // Refresh info after cleanup
|
| 30 |
} catch (error) {
|
|
|
|
| 10 |
const fetchStorageInfo = async () => {
|
| 11 |
setLoading(true);
|
| 12 |
try {
|
| 13 |
+
const response = await axios.get('http://0.0.0.0:7860/storage/info');
|
| 14 |
setStorageInfo(response.data);
|
| 15 |
setMessage('');
|
| 16 |
} catch (error) {
|
|
|
|
| 24 |
const handleCleanup = async () => {
|
| 25 |
setLoading(true);
|
| 26 |
try {
|
| 27 |
+
const response = await axios.post(`http://0.0.0.0:7860/storage/cleanup?max_age_hours=${cleanupAge}`);
|
| 28 |
setMessage(response.data.message);
|
| 29 |
fetchStorageInfo(); // Refresh info after cleanup
|
| 30 |
} catch (error) {
|