Spaces:
Runtime error
Runtime error
update README.md
Browse files
README.md
CHANGED
@@ -1,37 +1,9 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
## How to deploy:
|
11 |
-
|
12 |
-
1. Install the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli#download-and-install)
|
13 |
-
2. Clone this repository:
|
14 |
-
```
|
15 |
-
git clone https://github.com/tmabraham/UPIT.git
|
16 |
-
```
|
17 |
-
3. Initialize a Heroku web app from the command line (in the UPIT repository folder):
|
18 |
-
```
|
19 |
-
heroku create
|
20 |
-
```
|
21 |
-
4. Deploy the `web_app` folder
|
22 |
-
```
|
23 |
-
git subtree push --prefix examples/web_app heroku master
|
24 |
-
```
|
25 |
-
And that's it! Heroku will process the code, compress it and deploy it, providing you with a link you can visit at any time!
|
26 |
-
|
27 |
-
This deployment was based on [this guide](https://towardsdatascience.com/how-to-deploy-a-machine-learning-ui-on-heroku-in-5-steps-b8cd3c9208e6).
|
28 |
-
|
29 |
-
## File descriptions:
|
30 |
-
|
31 |
-
`cyclegan_inference.ipynb` - This is a notebook with all the code to run a Gradio web app demo. Running this notebook will yield in a temporary temporary web app that is not persistent (runs for 6 hours). The `gradio.app` link is provided after running the code. Also note that this code is set up to run on the GPU. This can be easily changed by changing the `map_location` in `torch.load`.
|
32 |
-
|
33 |
-
`cyclegan_inference.py` - This is a Python file version of `cyclegan_inference.ipynb` that runs on the CPU and takes in 256x256 images (due to low memory for free Heroku dyno). This is what is used for the Heroku deployment.
|
34 |
-
|
35 |
-
`generator.pth` - My model file saved with the UPIT `export_generator` function. You can replace with your own generator.
|
36 |
-
|
37 |
-
`Procfile`,`requirements.txt`,`runtime.txt`,`setup.sh` - These files are required for Heroku deployment.
|
|
|
1 |
+
---
|
2 |
+
title: Horse-to-Zebra CycleGAN with UPIT
|
3 |
+
emoji: 🐴
|
4 |
+
colorFrom: yellow
|
5 |
+
colorTo: orange
|
6 |
+
sdk: gradio
|
7 |
+
app_file: cyclegan_inference.py
|
8 |
+
pinned: false
|
9 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|