Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def regenerate_pubkey(pubkey, oauth_token: gr.OAuthToken | None):
|
|
27 |
if oauth_token.token is None:
|
28 |
raise ValueError("You must be logged in to use Ollamafy")
|
29 |
|
30 |
-
hash_oauth = hashlib.sha256(oauth_token.token).hexdigest()
|
31 |
generate_ollama_host_file = f"echo $(ss -natp | grep (cat ollama.pid) | awk '{{print $4}}') > ollama.host"
|
32 |
generate_ollama_pid_file = f"echo $! > ollama.pid"
|
33 |
ollama_pubkey = f"cat {HOME}/{hash_oauth}/.ollama/id_ed25519.pub"
|
@@ -73,7 +73,7 @@ def ollamafy_model(login, model_id, ollama_library_username , ollama_q_method, l
|
|
73 |
|
74 |
if oauth_token.token is None:
|
75 |
raise ValueError("You must be logged in to use Ollamafy")
|
76 |
-
hash_oauth = hashlib.sha256(oauth_token.token).hexdigest()
|
77 |
|
78 |
# username = whoami(oauth_token.token)["name"]
|
79 |
model_name = model_id.split('/')[-1]
|
|
|
27 |
if oauth_token.token is None:
|
28 |
raise ValueError("You must be logged in to use Ollamafy")
|
29 |
|
30 |
+
hash_oauth = hashlib.sha256(b"{oauth_token.token}").hexdigest()
|
31 |
generate_ollama_host_file = f"echo $(ss -natp | grep (cat ollama.pid) | awk '{{print $4}}') > ollama.host"
|
32 |
generate_ollama_pid_file = f"echo $! > ollama.pid"
|
33 |
ollama_pubkey = f"cat {HOME}/{hash_oauth}/.ollama/id_ed25519.pub"
|
|
|
73 |
|
74 |
if oauth_token.token is None:
|
75 |
raise ValueError("You must be logged in to use Ollamafy")
|
76 |
+
hash_oauth = hashlib.sha256(b"{oauth_token.token}").hexdigest()
|
77 |
|
78 |
# username = whoami(oauth_token.token)["name"]
|
79 |
model_name = model_id.split('/')[-1]
|