forked from open-webui/open-webui
feat: gguf upload
This commit is contained in:
parent
6ea9f6e198
commit
e539cf5c28
6 changed files with 457 additions and 96 deletions
|
@ -13,3 +13,11 @@ def get_gravatar_url(email):
|
|||
|
||||
# Grab the actual image URL
|
||||
return f"https://www.gravatar.com/avatar/{hash_hex}?d=mp"
|
||||
|
||||
|
||||
def calculate_sha256(file):
|
||||
sha256 = hashlib.sha256()
|
||||
# Read the file in chunks to efficiently handle large files
|
||||
for chunk in iter(lambda: file.read(8192), b""):
|
||||
sha256.update(chunk)
|
||||
return sha256.hexdigest()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue