Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
f0d441e
1
Parent(s):
623fb8a
update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,10 @@
|
|
| 12 |
# See the License for the specific language governing permissions and
|
| 13 |
# limitations under the License.
|
| 14 |
|
|
|
|
|
|
|
| 15 |
import gradio as gr
|
|
|
|
| 16 |
import pillow_avif
|
| 17 |
import spaces
|
| 18 |
import torch
|
|
@@ -291,6 +294,9 @@ with gr.Blocks() as demo:
|
|
| 291 |
"""
|
| 292 |
)
|
| 293 |
|
|
|
|
|
|
|
|
|
|
| 294 |
download_models()
|
| 295 |
|
| 296 |
prepare_pipeline(model_version=ModelVersion.DEFAULT_VERSION, enable_realism=ENABLE_REALISM_DEFAULT, enable_anti_blur=ENABLE_ANTI_BLUR_DEFAULT)
|
|
|
|
| 12 |
# See the License for the specific language governing permissions and
|
| 13 |
# limitations under the License.
|
| 14 |
|
| 15 |
+
import os
|
| 16 |
+
|
| 17 |
import gradio as gr
|
| 18 |
+
import huggingface_hub
|
| 19 |
import pillow_avif
|
| 20 |
import spaces
|
| 21 |
import torch
|
|
|
|
| 294 |
"""
|
| 295 |
)
|
| 296 |
|
| 297 |
+
|
| 298 |
+
huggingface_hub.login(os.getenv('PRIVATE_HF_TOKEN'))
|
| 299 |
+
|
| 300 |
download_models()
|
| 301 |
|
| 302 |
prepare_pipeline(model_version=ModelVersion.DEFAULT_VERSION, enable_realism=ENABLE_REALISM_DEFAULT, enable_anti_blur=ENABLE_ANTI_BLUR_DEFAULT)
|