Santiago Valencia commited on
Commit
c300a67
·
1 Parent(s): f8bcd3d

Gradio App with cuda avalaibility

Browse files
Files changed (2) hide show
  1. app.py +19 -0
  2. requirements.txt +7 -7
app.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import time
3
+ import gradio as gr
4
+
5
+ def bot(message, history, cuda_avail):
6
+ if cuda_avail:
7
+ time.sleep(0.002)
8
+ yield "Cuda On"
9
+
10
+ else:
11
+ time.sleep(0.002)
12
+ yield "Cuda Off"
13
+
14
+ app = gr.ChatInterface(bot,
15
+ title='Triton',
16
+ )
17
+
18
+ if __name__ == '__main__':
19
+ app.launch()
requirements.txt CHANGED
@@ -1,19 +1,19 @@
1
  torch
2
- PyMuPDF==1.23.26
3
  matplotlib
4
  numpy
5
  pandas
6
  Requests==2.31.0
7
  sentence_transformers==2.5.1
8
- spacy
9
  tqdm==4.66.2
10
  transformers==4.38.2
11
- accelerate
12
- bitsandbytes
13
- jupyter
14
  wheel
15
- lxml_html_clean
16
- newspaper3k
17
  flask
18
  openai
19
  # flash-attn
 
1
  torch
2
+ # PyMuPDF==1.23.26
3
  matplotlib
4
  numpy
5
  pandas
6
  Requests==2.31.0
7
  sentence_transformers==2.5.1
8
+ # spacy
9
  tqdm==4.66.2
10
  transformers==4.38.2
11
+ # accelerate
12
+ # bitsandbytes
13
+ # jupyter
14
  wheel
15
+ # lxml_html_clean
16
+ # newspaper3k
17
  flask
18
  openai
19
  # flash-attn