multimodalart HF Staff commited on
Commit
6d82755
·
verified ·
1 Parent(s): 62a119d

[Admin maintenance] Support new ZeroGPU hardware

Browse files

Thank you so much for having shared this Space with the community on this demo. We have upgraded the ZeroGPU infra-structure to run on modern blackwell architecture.
For that, we need to upgrade your demo to support that. This PR fixes your demo to work with the new architecture. As this is something we broke on our end, we may merge this PR autonomously. If this breaks unexpectedly or brings unintended consequences, feel free to revert, modify or otherwise. Any issues you can email apolinario@huggingface.co

Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +13 -1
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 🖼
4
  colorFrom: purple
5
  colorTo: red
6
  sdk: gradio
7
- sdk_version: 4.42.0
8
  app_file: app.py
9
  pinned: false
10
  license: gpl-3.0
 
4
  colorFrom: purple
5
  colorTo: red
6
  sdk: gradio
7
+ sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
10
  license: gpl-3.0
app.py CHANGED
@@ -1,7 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  import numpy as np
3
  import random
4
- import spaces #[uncomment to use ZeroGPU]
5
  from diffusers import DiffusionPipeline
6
  import torch
7
 
 
1
+ import huggingface_hub
2
+ if not hasattr(huggingface_hub, "HfFolder"):
3
+ class HfFolder:
4
+ @staticmethod
5
+ def get_token():
6
+ return huggingface_hub.get_token()
7
+ @staticmethod
8
+ def save_token(token):
9
+ pass
10
+ huggingface_hub.HfFolder = HfFolder
11
+
12
+ import spaces #[uncomment to use ZeroGPU]
13
+
14
  import gradio as gr
15
  import numpy as np
16
  import random
 
17
  from diffusers import DiffusionPipeline
18
  import torch
19