jhon parra
commited on
Commit
•
5580d4b
1
Parent(s):
fe82913
updated requirements
Browse files- app.py +0 -3
- requirements.txt +5 -6
app.py
CHANGED
@@ -12,9 +12,6 @@ MODELS={
|
|
12 |
'tokenizer':AutoTokenizer.from_pretrained("jhonparra18/petro-twitter-assistant-30ep-large"),
|
13 |
'model':AutoModelForCausalLM.from_pretrained("jhonparra18/petro-twitter-assistant-30ep-large")}}
|
14 |
|
15 |
-
# MODELS={'petro':pipeline('text-generation', model='jhonparra18/petro-twitter-assistant-30ep-large'),
|
16 |
-
# 'uribe':pipeline('text-generation', model='jhonparra18/uribe-twitter-assistant-30ep')}
|
17 |
-
|
18 |
|
19 |
def text_completion(tokenizer,model,input_text:str,max_len:int=100):
|
20 |
tokenizer.padding_side="left" ##start padding from left to right
|
|
|
12 |
'tokenizer':AutoTokenizer.from_pretrained("jhonparra18/petro-twitter-assistant-30ep-large"),
|
13 |
'model':AutoModelForCausalLM.from_pretrained("jhonparra18/petro-twitter-assistant-30ep-large")}}
|
14 |
|
|
|
|
|
|
|
15 |
|
16 |
def text_completion(tokenizer,model,input_text:str,max_len:int=100):
|
17 |
tokenizer.padding_side="left" ##start padding from left to right
|
requirements.txt
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
-
pandas
|
2 |
-
datasets
|
3 |
-
transformers
|
4 |
-
|
5 |
-
|
6 |
-
streamlit
|
|
|
1 |
+
pandas==1.5.3
|
2 |
+
datasets==2.9.0
|
3 |
+
transformers==4.26.1
|
4 |
+
torch==1.13.1
|
5 |
+
streamlit==1.18.1
|
|