File size: 751 Bytes
827fc1c
 
 
d12ecdb
827fc1c
 
 
 
 
 
351a7a7
827fc1c
0450cdb
b10d925
0450cdb
827fc1c
 
 
 
 
 
 
 
dac9882
827fc1c
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
#!/bin/bash

HF_DATASET_REPO="InstaDeepAI/mlipaudit-results"
HF_DATASET_LOCAL_PATH="/app/results"

echo "Attempting to download dataset from ${HF_DATASET_REPO} to ${HF_DATASET_LOCAL_PATH}..."

# Ensure the local data directory exists
mkdir -p ${HF_DATASET_LOCAL_PATH}

hf download ${HF_DATASET_REPO} --local-dir ${HF_DATASET_LOCAL_PATH} --repo-type dataset

# Find all regular files (-type f) in the downloaded directory and its subdirectories, and delete them.
find "${HF_DATASET_LOCAL_PATH}" -maxdepth 1 -type f -delete

if [ $? -eq 0 ]; then
    echo "Dataset downloaded successfully!"
else
    echo "Failed to download dataset."
    exit 1 # Exit if download fails
fi

echo "Starting Streamlit app..."
exec mlipaudit gui /app/results --is-public