File size: 669 Bytes
32d4b56
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

while true; do
    echo "Checking and installing required packages..."

    # Install required packages
    pip install --upgrade pip
    pip install torch torchvision
    pip install diffusers==0.27.2
    pip install gradio==3.1.5
    pip install moviepy
    pip install opencv-python-headless==4.5.5.64
    pip install huggingface-hub

    # Run the Gradio interface
    python ~/ai-dreams-x/gradio_interface.py

    # Check if the last command was successful
    if [ $? -eq 0 ]; then
        echo "Gradio interface is running successfully."
        break
    else
        echo "An error occurred. Retrying in 5 seconds..."
        sleep 5
    fi
done