crabz commited on
Commit
0fd6af9
β€’
1 Parent(s): edaad82

add pytoch install command

Browse files
Files changed (2) hide show
  1. app.py +6 -0
  2. requirements.txt +1 -1
app.py CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  import gradio as gr
2
  from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
3
 
 
1
+ # -*- coding: utf-8 -*-
2
+ import os
3
+
4
+ os.system("pip3 install torch==1.10.1+cpu torchvision==0.11.2+cpu torchaudio==0.10.1+cpu -f "
5
+ "https://download.pytorch.org/whl/cpu/torch_stable.html")
6
+
7
  import gradio as gr
8
  from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
9
 
requirements.txt CHANGED
@@ -1,3 +1,3 @@
1
  gradio==2.6.3
2
  spacy==3.2.1
3
- transformers==4.13.0
 
1
  gradio==2.6.3
2
  spacy==3.2.1
3
+ transformers==4.13.0