This repository demonstrates the deployment of Gradio applications using transformer models.
It includes two examples: demo.py
which employs transformer models, and gr_demo.py
, the base gradio example from the quickstart guide. To use a specific file, change the demo.py
text in the CMD ["python", "-u", "demo.py"]
command to the desired file.
- Docker
- Clone this repository:
git clone https://github.com/arora-r/gradio-example.git
- Navigate to the repository directory:
cd gradio-example
- Build the Docker image:
docker build -t gradio-example .
- Run the Docker container:
docker run -p 8080:8080 gradio-example
- Open Gradio in your web browser: http://localhost:8080
To use your own transformer models in the Gradio application, you can modify the demo.py
file to import and utilize your model. Then, rebuild the Docker image and run the container as described above.
This repository was inspired by the examples in the Gradio repository, found here.