ikraamkb commited on
Commit
e2fade1
·
verified ·
1 Parent(s): 4e1a845

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,4 +1,4 @@
1
- import gradio as gr
2
  import numpy as np
3
  import fitz # PyMuPDF
4
  import torch
@@ -151,3 +151,9 @@ app = gr.mount_gradio_app(app, demo, path="/")
151
  @app.get("/")
152
  def home():
153
  return RedirectResponse(url="/")
 
 
 
 
 
 
 
1
+ """import gradio as gr
2
  import numpy as np
3
  import fitz # PyMuPDF
4
  import torch
 
151
  @app.get("/")
152
  def home():
153
  return RedirectResponse(url="/")
154
+ """
155
+ import torch
156
+ print("CUDA Available:", torch.cuda.is_available())
157
+ print("Torch Device Count:", torch.cuda.device_count())
158
+ print("Current Device:", torch.cuda.current_device() if torch.cuda.is_available() else "CPU")
159
+ print("CUDA Device Name:", torch.cuda.get_device_name(0) if torch.cuda.is_available() else "None")