Owos commited on
Commit
8d31691
·
1 Parent(s): 1f81609

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -24
app.py CHANGED
@@ -4,7 +4,7 @@ import numpy as np
4
  import threading
5
  import torch
6
  import numpy as np
7
- from styling import footer
8
  from transformers import AutoTokenizer, AutoModelWithLMHead
9
  from huggingface_hub import HfApi, hf_hub_download
10
  from torch.utils.data import Dataset, DataLoader
@@ -213,29 +213,29 @@ def set_seed():
213
 
214
 
215
 
216
- # with st.sidebar:
217
-
218
- # st.image("Koya_Presentation-removebg-preview.png")
219
- # st.subheader("Abstract")
220
- # st.markdown(
221
- # """
222
- # <div style="text-align: justify">
223
- # <h6> Pretrained large language models (LLMs) are widely used for various downstream tasks in different languages. However, selecting the best
224
- # LLM (from a large set of potential LLMs) for a given downstream task and language is a challenging and computationally expensive task, making
225
- # the efficient use of LLMs difficult for low-compute communities. To address this challenge, we present Koya, a recommender system built to assist
226
- # researchers and practitioners in choosing the right LLM for their task and language, without ever having to finetune the LLMs. Koya is built with
227
- # the Koya Pseudo-Perplexity (KPPPL), our adaptation of the pseudo perplexity, and ranks LLMs in order of compatibility with the language of interest,
228
- # making it easier and cheaper to choose the most compatible LLM. By evaluating Koya using five pretrained LLMs and three African languages
229
- # (Yoruba, Kinyarwanda, and Amharic), we show an average recommender accuracy of 95%, demonstrating its effectiveness. Koya aims to offer
230
- # an easy to use (through a simple web interface accessible at https://huggingface.co/spaces/koya-recommender/system), cost-effective, fast and
231
- # efficient tool to assist researchers and practitioners with low or limited compute access.</h6>
232
- # </div>
233
-
234
- # """,
235
- # unsafe_allow_html=True
236
- # )
237
- # url = "https://drive.google.com/file/d/1eWat34ot3j8onIeKDnJscKalp2oYnn8O/view"
238
- # st.write("check out the paper [here](%s)" % url)
239
  with st.sidebar:
240
  footer()
241
 
@@ -267,6 +267,7 @@ with st.sidebar:
267
  sentence, tokenizer, model, MLM_MASK_TOKEN, MLM_UNK_TOKEN, BATCH_SIZE
268
  )
269
  scores[model_id] = score
 
270
  my_bar.progress(index + 1 / len(selected_models))
271
  scores = sort_dictionary(scores)
272
  st.write("Our recommendation is:", scores)
 
4
  import threading
5
  import torch
6
  import numpy as np
7
+ #from styling import footer
8
  from transformers import AutoTokenizer, AutoModelWithLMHead
9
  from huggingface_hub import HfApi, hf_hub_download
10
  from torch.utils.data import Dataset, DataLoader
 
213
 
214
 
215
 
216
+ with st.sidebar:
217
+
218
+ st.image("Koya_Presentation-removebg-preview.png")
219
+ st.subheader("Abstract")
220
+ st.markdown(
221
+ """
222
+ <div style="text-align: justify">
223
+ <h6> Pretrained large language models (LLMs) are widely used for various downstream tasks in different languages. However, selecting the best
224
+ LLM (from a large set of potential LLMs) for a given downstream task and language is a challenging and computationally expensive task, making
225
+ the efficient use of LLMs difficult for low-compute communities. To address this challenge, we present Koya, a recommender system built to assist
226
+ researchers and practitioners in choosing the right LLM for their task and language, without ever having to finetune the LLMs. Koya is built with
227
+ the Koya Pseudo-Perplexity (KPPPL), our adaptation of the pseudo perplexity, and ranks LLMs in order of compatibility with the language of interest,
228
+ making it easier and cheaper to choose the most compatible LLM. By evaluating Koya using five pretrained LLMs and three African languages
229
+ (Yoruba, Kinyarwanda, and Amharic), we show an average recommender accuracy of 95%, demonstrating its effectiveness. Koya aims to offer
230
+ an easy to use (through a simple web interface accessible at https://huggingface.co/spaces/koya-recommender/system), cost-effective, fast and
231
+ efficient tool to assist researchers and practitioners with low or limited compute access.</h6>
232
+ </div>
233
+
234
+ """,
235
+ unsafe_allow_html=True
236
+ )
237
+ url = "https://drive.google.com/file/d/1eWat34ot3j8onIeKDnJscKalp2oYnn8O/view"
238
+ st.write("check out the paper [here](%s)" % url)
239
  with st.sidebar:
240
  footer()
241
 
 
267
  sentence, tokenizer, model, MLM_MASK_TOKEN, MLM_UNK_TOKEN, BATCH_SIZE
268
  )
269
  scores[model_id] = score
270
+ st.write(index, len(selected_models))
271
  my_bar.progress(index + 1 / len(selected_models))
272
  scores = sort_dictionary(scores)
273
  st.write("Our recommendation is:", scores)