Spaces:
Running
on
A10G
Running
on
A10G
Galunid
commited on
Commit
·
a8aeed5
1
Parent(s):
5fd1a0a
Remove convert.py usage
Browse files
app.py
CHANGED
@@ -15,18 +15,12 @@ from apscheduler.schedulers.background import BackgroundScheduler
|
|
15 |
|
16 |
from textwrap import dedent
|
17 |
|
18 |
-
LLAMA_LIKE_ARCHS = ["MistralForCausalLM",]
|
19 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
20 |
|
21 |
def script_to_use(model_id, api):
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
arch = info.config.get("architectures", None)
|
26 |
-
if arch is None:
|
27 |
-
return None
|
28 |
-
arch = arch[0]
|
29 |
-
return "convert.py" if arch in LLAMA_LIKE_ARCHS else "convert-hf-to-gguf.py"
|
30 |
|
31 |
def process_model(model_id, q_method, private_repo, oauth_token: gr.OAuthToken | None):
|
32 |
if oauth_token.token is None:
|
@@ -188,4 +182,4 @@ scheduler.add_job(restart_space, "interval", seconds=21600)
|
|
188 |
scheduler.start()
|
189 |
|
190 |
# Launch the interface
|
191 |
-
demo.queue(default_concurrency_limit=1, max_size=5).launch(debug=True)
|
|
|
15 |
|
16 |
from textwrap import dedent
|
17 |
|
|
|
18 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
19 |
|
20 |
def script_to_use(model_id, api):
|
21 |
+
del model_id, api
|
22 |
+
return "convert-hf-to-gguf.py"
|
23 |
+
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
def process_model(model_id, q_method, private_repo, oauth_token: gr.OAuthToken | None):
|
26 |
if oauth_token.token is None:
|
|
|
182 |
scheduler.start()
|
183 |
|
184 |
# Launch the interface
|
185 |
+
demo.queue(default_concurrency_limit=1, max_size=5).launch(debug=True)
|