Tanvir1337 commited on
Commit
cb097f0
β€’
1 Parent(s): c64d9da

app.py: fix formatting issues, move gguf before gptq and update repo_id

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -15,18 +15,18 @@ api = HfApi()
15
  fs = HfFileSystem()
16
 
17
  def restart_space():
18
- time.sleep(36000)
19
- api.restart_space(repo_id="Weyaxi/thebloke-quantized-models", token=HF_TOKEN)
20
 
21
  text = f"""
22
  🎯 The Leaderboard aims to track TheBloke's quantized models.
23
 
24
  ## πŸ“š Type Of Models
25
 
26
- - GPTQ
27
-
28
  - GGUF
29
 
 
 
30
  - AWQ
31
 
32
  - GGML
@@ -101,32 +101,32 @@ for model, values in liste.items():
101
  ggml_value = value
102
 
103
  authors.append(model.split('/')[0])
104
- gptq.append(gptq_value)
105
  gguf.append(gguf_value)
 
106
  awq.append(awq_value)
107
  ggml.append(ggml_value)
108
 
109
 
110
- df = pd.DataFrame({'πŸ‘€ Author Name': authors, 'πŸ€– Model Name': models, 'πŸ‘ GPTQ': gptq, 'πŸ“₯ GGUF': gguf, 'πŸ€·β€β™‚οΈ AWQ': awq, '😭 GGML': ggml})
111
 
112
 
113
  def search(search_text):
114
- if not search_text:
115
- return df
116
 
117
- if len(search_text.split('/'))>1:
118
- return df[df['πŸ€– Model Name'] == clickable(search_text)]
119
- else:
120
- return df[df['πŸ‘€ Author Name'] == clickable(search_text)]
121
 
122
 
123
  def clickable(x):
124
- return None if not x else f'<a target="_blank" href="https://huggingface.co/{x}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{x}</a>'
125
 
126
 
127
  def to_clickable(df):
128
  for column in list(df.columns):
129
- df[column] = df[column].apply(lambda x: clickable(x))
130
  return df
131
 
132
 
@@ -145,4 +145,4 @@ with gr.Blocks() as demo:
145
  search_bar.submit(fn=search, inputs=search_bar, outputs=gr_df)
146
 
147
  threading.Thread(target=restart_space).start()
148
- demo.launch()
 
15
  fs = HfFileSystem()
16
 
17
  def restart_space():
18
+ time.sleep(36000)
19
+ api.restart_space(repo_id="Tanvir1337/thebloke-quantized-models", token=HF_TOKEN)
20
 
21
  text = f"""
22
  🎯 The Leaderboard aims to track TheBloke's quantized models.
23
 
24
  ## πŸ“š Type Of Models
25
 
 
 
26
  - GGUF
27
 
28
+ - GPTQ
29
+
30
  - AWQ
31
 
32
  - GGML
 
101
  ggml_value = value
102
 
103
  authors.append(model.split('/')[0])
 
104
  gguf.append(gguf_value)
105
+ gptq.append(gptq_value)
106
  awq.append(awq_value)
107
  ggml.append(ggml_value)
108
 
109
 
110
+ df = pd.DataFrame({'πŸ‘€ Author Name': authors, 'πŸ€– Model Name': models, 'πŸ“₯ GGUF': gguf, 'πŸ‘ GPTQ': gptq, 'πŸ€·β€β™‚οΈ AWQ': awq, '😭 GGML': ggml})
111
 
112
 
113
  def search(search_text):
114
+ if not search_text:
115
+ return df
116
 
117
+ if len(search_text.split('/'))>1:
118
+ return df[df['πŸ€– Model Name'] == clickable(search_text)]
119
+ else:
120
+ return df[df['πŸ‘€ Author Name'] == clickable(search_text)]
121
 
122
 
123
  def clickable(x):
124
+ return None if not x else f'<a target="_blank" href="https://huggingface.co/{x}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{x}</a>'
125
 
126
 
127
  def to_clickable(df):
128
  for column in list(df.columns):
129
+ df[column] = df[column].apply(lambda x: clickable(x))
130
  return df
131
 
132
 
 
145
  search_bar.submit(fn=search, inputs=search_bar, outputs=gr_df)
146
 
147
  threading.Thread(target=restart_space).start()
148
+ demo.launch()