mgoin commited on
Commit
cf009e8
·
verified ·
1 Parent(s): c0f8aad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -12,14 +12,6 @@ from llmcompressor.transformers import oneshot, wrap_hf_model_class
12
  class CommitInfo:
13
  repo_url: str
14
 
15
- # def get_model_class(class_name: str):
16
- # """Dynamically import and return the specified model class from transformers"""
17
- # try:
18
- # exec(f"from transformers import {class_name}")
19
- # return eval(class_name)
20
- # except Exception as e:
21
- # raise ValueError(f"Failed to import model class {class_name}: {str(e)}")
22
-
23
  def parse_ignore_list(ignore_str: str) -> List[str]:
24
  """Parse comma-separated ignore list string into list"""
25
  return [item.strip() for item in ignore_str.split(',') if item.strip()]
@@ -157,7 +149,7 @@ processor = AutoProcessor.from_pretrained("{target_repo}")
157
 
158
  return CommitInfo(repo_url=f"https://huggingface.co/{target_repo}")
159
 
160
- @spaces.GPU(duration=300) # 5 minutes timeout for large models
161
  def run(
162
  model_id: str,
163
  token: str,
 
12
  class CommitInfo:
13
  repo_url: str
14
 
 
 
 
 
 
 
 
 
15
  def parse_ignore_list(ignore_str: str) -> List[str]:
16
  """Parse comma-separated ignore list string into list"""
17
  return [item.strip() for item in ignore_str.split(',') if item.strip()]
 
149
 
150
  return CommitInfo(repo_url=f"https://huggingface.co/{target_repo}")
151
 
152
+ @spaces.GPU(duration=1200) # 20 minutes timeout for large models
153
  def run(
154
  model_id: str,
155
  token: str,