mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-03-06 05:33:50 +01:00
Patch gradio 4.x for huggingface-hub 1.x compatibility
This commit is contained in:
parent
38d0eeefc0
commit
9814d3d0ae
|
|
@ -3,6 +3,11 @@ import shutil
|
|||
import warnings
|
||||
from pathlib import Path
|
||||
|
||||
# Monkey-patch HfFolder for gradio 4.x compatibility with huggingface-hub 1.x
|
||||
import huggingface_hub
|
||||
if not hasattr(huggingface_hub, 'HfFolder'):
|
||||
huggingface_hub.HfFolder = type('HfFolder', (), {'get_token': staticmethod(huggingface_hub.get_token)})
|
||||
|
||||
from modules import shared
|
||||
from modules.block_requests import OpenMonkeyPatch, RequestBlocker
|
||||
from modules.image_models import load_image_model
|
||||
|
|
|
|||
Loading…
Reference in a new issue