mirror of
https://github.com/openai/whisper.git
synced 2025-11-23 22:15:58 +00:00
Merge pull request #1 from ariavn-byte/copilot/prepare-for-railway-deployment
Prepare repository for Railway deployment
This commit is contained in:
commit
980886bef4
3
farsi_transcriber_web/.gitignore
vendored
3
farsi_transcriber_web/.gitignore
vendored
@ -32,3 +32,6 @@ Thumbs.db
|
|||||||
|
|
||||||
# Build output
|
# Build output
|
||||||
*.tgz
|
*.tgz
|
||||||
|
*.tsbuildinfo
|
||||||
|
vite.config.js
|
||||||
|
vite.config.d.ts
|
||||||
|
|||||||
11
farsi_transcriber_web/backend/nixpacks.toml
Normal file
11
farsi_transcriber_web/backend/nixpacks.toml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Nixpacks configuration for Railway deployment
|
||||||
|
# Ensures ffmpeg is available for Whisper audio processing
|
||||||
|
|
||||||
|
[phases.setup]
|
||||||
|
nixPkgs = ["ffmpeg"]
|
||||||
|
|
||||||
|
[phases.install]
|
||||||
|
cmds = ["pip install -r requirements.txt"]
|
||||||
|
|
||||||
|
[start]
|
||||||
|
cmd = "gunicorn --workers 2 --worker-class sync --timeout 120 --bind 0.0.0.0:$PORT app:app"
|
||||||
@ -1,7 +1,7 @@
|
|||||||
Flask==2.3.3
|
Flask==2.3.3
|
||||||
Flask-CORS==4.0.0
|
Flask-CORS==4.0.0
|
||||||
python-dotenv==1.0.0
|
python-dotenv==1.0.0
|
||||||
openai-whisper==20230314
|
openai-whisper==20240930
|
||||||
torch>=1.10.1
|
torch>=1.10.1
|
||||||
python-multipart==0.0.6
|
python-multipart==0.0.6
|
||||||
gunicorn==21.2.0
|
gunicorn==21.2.0
|
||||||
|
|||||||
11
farsi_transcriber_web/nixpacks.toml
Normal file
11
farsi_transcriber_web/nixpacks.toml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# Nixpacks configuration for Railway deployment (Frontend)
|
||||||
|
# Configures Node.js build and preview server
|
||||||
|
|
||||||
|
[phases.install]
|
||||||
|
cmds = ["npm install"]
|
||||||
|
|
||||||
|
[phases.build]
|
||||||
|
cmds = ["npm run build"]
|
||||||
|
|
||||||
|
[start]
|
||||||
|
cmd = "npm run preview"
|
||||||
2456
farsi_transcriber_web/package-lock.json
generated
Normal file
2456
farsi_transcriber_web/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -10,21 +10,23 @@
|
|||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^18.2.0",
|
"@tailwindcss/postcss": "^4.1.17",
|
||||||
"react-dom": "^18.2.0",
|
|
||||||
"lucide-react": "^0.263.1",
|
"lucide-react": "^0.263.1",
|
||||||
"re-resizable": "^6.9.9",
|
"re-resizable": "^6.9.9",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0",
|
||||||
"sonner": "^1.2.0"
|
"sonner": "^1.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/node": "^20.8.0",
|
||||||
"@types/react": "^18.2.37",
|
"@types/react": "^18.2.37",
|
||||||
"@types/react-dom": "^18.2.15",
|
"@types/react-dom": "^18.2.15",
|
||||||
"@vitejs/plugin-react": "^4.2.0",
|
"@vitejs/plugin-react": "^4.2.0",
|
||||||
"typescript": "^5.2.2",
|
|
||||||
"vite": "^5.0.0",
|
|
||||||
"tailwindcss": "^4.0.0",
|
|
||||||
"autoprefixer": "^10.4.16",
|
"autoprefixer": "^10.4.16",
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.31",
|
||||||
"@types/node": "^20.8.0"
|
"tailwindcss": "^4.0.0",
|
||||||
|
"terser": "^5.44.1",
|
||||||
|
"typescript": "^5.2.2",
|
||||||
|
"vite": "^5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
plugins: {
|
plugins: {
|
||||||
tailwindcss: {},
|
'@tailwindcss/postcss': {},
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -158,7 +158,7 @@ export default function App() {
|
|||||||
if (!query) return text;
|
if (!query) return text;
|
||||||
|
|
||||||
const parts = text.split(new RegExp(`(${query})`, 'gi'));
|
const parts = text.split(new RegExp(`(${query})`, 'gi'));
|
||||||
return parts.map((part, i) =>
|
return parts.map((part) =>
|
||||||
part.toLowerCase() === query.toLowerCase()
|
part.toLowerCase() === query.toLowerCase()
|
||||||
? `<mark style="background-color: ${isDark ? '#4CAF50' : '#FFEB3B'}; color: ${isDark ? '#000' : '#000'}; padding: 2px 4px; border-radius: 2px;">${part}</mark>`
|
? `<mark style="background-color: ${isDark ? '#4CAF50' : '#FFEB3B'}; color: ${isDark ? '#000' : '#000'}; padding: 2px 4px; border-radius: 2px;">${part}</mark>`
|
||||||
: part
|
: part
|
||||||
@ -184,7 +184,7 @@ export default function App() {
|
|||||||
|
|
||||||
<Resizable
|
<Resizable
|
||||||
size={windowSize}
|
size={windowSize}
|
||||||
onResizeStop={(e, direction, ref, d) => {
|
onResizeStop={(_e, _direction, _ref, d) => {
|
||||||
setWindowSize({
|
setWindowSize({
|
||||||
width: windowSize.width + d.width,
|
width: windowSize.width + d.width,
|
||||||
height: windowSize.height + d.height,
|
height: windowSize.height + d.height,
|
||||||
@ -350,7 +350,10 @@ export default function App() {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Select value={exportFormat} onValueChange={setExportFormat}>
|
<Select
|
||||||
|
value={exportFormat}
|
||||||
|
onChange={(e) => setExportFormat(e.target.value as 'txt' | 'docx' | 'pdf' | 'srt')}
|
||||||
|
>
|
||||||
<option value="txt">TXT</option>
|
<option value="txt">TXT</option>
|
||||||
<option value="docx">DOCX</option>
|
<option value="docx">DOCX</option>
|
||||||
<option value="pdf">PDF</option>
|
<option value="pdf">PDF</option>
|
||||||
|
|||||||
@ -32,6 +32,7 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
preview: {
|
preview: {
|
||||||
port: 3000,
|
port: parseInt(process.env.PORT || '3000'),
|
||||||
|
host: '0.0.0.0',
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user