Remove convert.py references from app.py

#68
Files changed (1) hide show
  1. app.py +4 -10
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
- info = api.model_info(model_id)
23
- if info.config is None:
24
- return None
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)