Rajeev Ranjan Pandey commited on
Commit
fd61bce
·
1 Parent(s): 703750f

fix: default light mode + lock deps with npm ci in both Dockerfiles

Browse files
Dockerfile CHANGED
@@ -3,7 +3,7 @@ FROM node:20-alpine AS build-step
3
 
4
  WORKDIR /app/frontend
5
  COPY frontend/package*.json ./
6
- RUN npm install
7
 
8
  COPY frontend/ ./
9
  RUN npm run build
 
3
 
4
  WORKDIR /app/frontend
5
  COPY frontend/package*.json ./
6
+ RUN npm ci --ignore-scripts
7
 
8
  COPY frontend/ ./
9
  RUN npm run build
Dockerfile.frontend CHANGED
@@ -1,6 +1,6 @@
1
  FROM node:20-alpine
2
  WORKDIR /app
3
  COPY frontend/package*.json ./
4
- RUN npm install
5
  COPY frontend/ .
6
  EXPOSE 5173
 
1
  FROM node:20-alpine
2
  WORKDIR /app
3
  COPY frontend/package*.json ./
4
+ RUN npm ci --ignore-scripts
5
  COPY frontend/ .
6
  EXPOSE 5173
frontend/src/api/client.js CHANGED
@@ -3,7 +3,7 @@ import axios from "axios";
3
  const api = axios.create({
4
  // Use relative paths in production (Hugging Face) so it hits the same domain.
5
  // In local dev, continue reaching out to FastAPI on port 8000.
6
- baseURL: import.meta.env.PROD ? "" : "http://127.0.0.1:8000"
7
  });
8
 
9
  export async function summarizeText(payload) {
 
3
  const api = axios.create({
4
  // Use relative paths in production (Hugging Face) so it hits the same domain.
5
  // In local dev, continue reaching out to FastAPI on port 8000.
6
+ baseURL: import.meta.env.PROD ? "" : "http://127.0.0.1:8001"
7
  });
8
 
9
  export async function summarizeText(payload) {
frontend/src/pages/Home.jsx CHANGED
@@ -13,7 +13,7 @@ const FALLBACK_TEXT = {
13
  };
14
 
15
  export default function Home() {
16
- const [isDark, setIsDark] = useState(true);
17
  const [datasetTrack, setDatasetTrack] = useState("gcc");
18
  const [text, setText] = useState(FALLBACK_TEXT.gcc);
19
  const [modelChoice, setModelChoice] = useState("bart_large_cnn");
 
13
  };
14
 
15
  export default function Home() {
16
+ const [isDark, setIsDark] = useState(false);
17
  const [datasetTrack, setDatasetTrack] = useState("gcc");
18
  const [text, setText] = useState(FALLBACK_TEXT.gcc);
19
  const [modelChoice, setModelChoice] = useState("bart_large_cnn");