sergiopperez commited on
Commit
9e24f6f
Β·
1 Parent(s): 6a62ad4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import torch
3
- from transformers import pipeline, GPTJForCausalLM, PeftModel, PeftConfig, AutoModelForCausalLM
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')