Guy24 commited on
Commit
a134b8a
·
1 Parent(s): af9dbe3

adding application

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. requirements.txt +2 -1
app.py CHANGED
@@ -3,13 +3,14 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
3
  import gradio as gr
4
  import pandas as pd
5
  from functools import lru_cache
 
6
 
7
  # ----------------------------------------------------------------------
8
  # IMPORTANT: This version uses the PatchscopesRetriever implementation
9
  # from the Tokens2Words paper (https://github.com/schwartz-lab-NLP/Tokens2Words)
10
  # ----------------------------------------------------------------------
11
  try:
12
- from .word_retriever import PatchscopesRetriever # pip install tokens2words
13
  except ImportError:
14
  PatchscopesRetriever = None
15
 
 
3
  import gradio as gr
4
  import pandas as pd
5
  from functools import lru_cache
6
+ import Tokens2Words
7
 
8
  # ----------------------------------------------------------------------
9
  # IMPORTANT: This version uses the PatchscopesRetriever implementation
10
  # from the Tokens2Words paper (https://github.com/schwartz-lab-NLP/Tokens2Words)
11
  # ----------------------------------------------------------------------
12
  try:
13
+ from Tokens2Words.word_retriever import PatchscopesRetriever # pip install tokens2words
14
  except ImportError:
15
  PatchscopesRetriever = None
16
 
requirements.txt CHANGED
@@ -2,4 +2,5 @@ torch
2
  transformers
3
  pandas
4
  tqdm
5
- scikit-learn
 
 
2
  transformers
3
  pandas
4
  tqdm
5
+ scikit-learn
6
+ git+https://github.com/schwartz-lab-NLP/Tokens2Words