File size: 1,155 Bytes
432a352
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash

# Init script for Myanmar TTS Space
echo "Initializing Myanmar TTS Space..."

# Clone the repository if needed
if [ ! -d "myanmar-tts" ]; then
    echo "Cloning repository..."
    git clone https://github.com/hpbyte/myanmar-tts.git
fi

# Create model directory if needed
if [ ! -d "trained_model" ]; then
    echo "Creating model directory..."
    mkdir -p trained_model
fi

# Check if model files exist
if [ ! -f "trained_model/checkpoint_latest.pth.tar" ] || [ ! -f "trained_model/hparams.yml" ]; then
    echo "Creating placeholder model files..."
    echo "This is a placeholder. Replace with actual model file." > trained_model/checkpoint_latest.pth.tar
    echo "# This is a placeholder. Replace with actual hparams.yml" > trained_model/hparams.yml
    
    echo "WARNING: Model files are missing. You need to upload them to the 'trained_model' directory."
    echo "Required files:"
    echo "1. trained_model/checkpoint_latest.pth.tar"
    echo "2. trained_model/hparams.yml"
fi

# Set up Python path
export PYTHONPATH=$PYTHONPATH:$(pwd):$(pwd)/myanmar-tts

# Run the setup script
python setup_repo.py

echo "Initialization complete."