Spaces:
Runtime error
Runtime error
Commit
Β·
9e24f6f
1
Parent(s):
6a62ad4
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
-
from transformers import pipeline, GPTJForCausalLM,
|
4 |
-
|
5 |
|
6 |
config = PeftConfig.from_pretrained("hackathon-somos-nlp-2023/bertin-gpt-j-6b-ner-es")
|
7 |
model = AutoModelForCausalLM.from_pretrained("hackathon-somos-nlp-2023/bertin-gpt-j-6b-ner-es", return_dict=True, load_in_8bit=True, device_map='auto')
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
+
from transformers import pipeline, GPTJForCausalLM, AutoModelForCausalLM
|
4 |
+
from peft import LoraConfig, get_peft_model, PeftModel, PeftConfig
|
5 |
|
6 |
config = PeftConfig.from_pretrained("hackathon-somos-nlp-2023/bertin-gpt-j-6b-ner-es")
|
7 |
model = AutoModelForCausalLM.from_pretrained("hackathon-somos-nlp-2023/bertin-gpt-j-6b-ner-es", return_dict=True, load_in_8bit=True, device_map='auto')
|