fbaldassarri commited on
Commit
21765f6
·
verified ·
1 Parent(s): 2b10ab8

Upload 5 files

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +2 -6
  3. requirements.txt +1 -1
README.md CHANGED
@@ -17,7 +17,7 @@ Inference scripts for pytorch weights-only-quantization
17
  ### Install
18
 
19
  ```
20
- conda create -n teq-inference python=3.11
21
 
22
  conda activate teq-inference
23
 
 
17
  ### Install
18
 
19
  ```
20
+ conda create -n teq-inference python=3.10
21
 
22
  conda activate teq-inference
23
 
app.py CHANGED
@@ -42,13 +42,9 @@ def run_teq_inference(model_id, weights_file, config_file, base_model, prompt, m
42
 
43
  def update_files(model_id):
44
  weights, configs = list_model_files(model_id)
45
- # Default to first file if available, else empty string
46
  weights_val = weights[0] if weights else ""
47
  configs_val = configs[0] if configs else ""
48
- return (
49
- gr.Dropdown.update(choices=weights, value=weights_val),
50
- gr.Dropdown.update(choices=configs, value=configs_val)
51
- )
52
 
53
  def build_ui():
54
  teq_models = list_teq_models()
@@ -68,7 +64,7 @@ def build_ui():
68
  model_id.change(
69
  update_files,
70
  inputs=model_id,
71
- outputs=[weights_file, config_file]
72
  )
73
  run_btn.click(
74
  run_teq_inference,
 
42
 
43
  def update_files(model_id):
44
  weights, configs = list_model_files(model_id)
 
45
  weights_val = weights[0] if weights else ""
46
  configs_val = configs[0] if configs else ""
47
+ return weights, weights_val, configs, configs_val
 
 
 
48
 
49
  def build_ui():
50
  teq_models = list_teq_models()
 
64
  model_id.change(
65
  update_files,
66
  inputs=model_id,
67
+ outputs=[weights_file, weights_file, config_file, config_file]
68
  )
69
  run_btn.click(
70
  run_teq_inference,
requirements.txt CHANGED
@@ -5,7 +5,7 @@ transformers==4.51.3
5
  neural_compressor==3.3.1
6
  intel-extension-for-pytorch==2.7.0
7
  gradio
8
- huggingface_hub==0.30.0
9
 
10
  --extra-index-url https://download.pytorch.org/whl/cpu
11
  torch==2.7.0
 
5
  neural_compressor==3.3.1
6
  intel-extension-for-pytorch==2.7.0
7
  gradio
8
+ huggingface_hub>=0.30.0
9
 
10
  --extra-index-url https://download.pytorch.org/whl/cpu
11
  torch==2.7.0