Skip to content

Commit 6abe498

Browse files
feat: AMD compatibility
1 parent 6560ba0 commit 6abe498

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
disable_progress_bars()
3939
os.environ["TOKENIZERS_PARALLELISM"] = "false"
4040
os.environ["TRANSFORMERS_NO_ADVISORY_WARNINGS"] = "true"
41-
device = "cuda" if torch.cuda.is_available() else "cpu"
41+
#AMD FIX
42+
os.environ["CUDA_VISIBLE_DEVICES"] = "0"
43+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
4244
model_name = 'pysentimiento/robertuito-base-cased'
4345
model_name = "Twitter/twhin-bert-base"
4446
model_name = "nickprock/setfit-italian-hate-speech"

requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@ evaluate
1010
seaborn
1111
matplotlib
1212
google-generativeai
13-
load-dotenv
13+
rich
14+
questionary
15+
pysentimiento
16+

0 commit comments

Comments
 (0)