0xdev23 commited on
Commit
085b59e
β€’
1 Parent(s): 33cfc9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -4,6 +4,12 @@ import torch
4
  from langchain.llms import HuggingFacePipeline
5
  import gradio as gr
6
 
 
 
 
 
 
 
7
  origin_model_path = "mistralai/Mistral-7B-Instruct-v0.1"
8
  model_path = "filipealmeida/Mistral-7B-Instruct-v0.1-sharded"
9
  bnb_config = BitsAndBytesConfig \
 
4
  from langchain.llms import HuggingFacePipeline
5
  import gradio as gr
6
 
7
+ device = 'cuda' if torch.cuda.is_available() else 'cpu'
8
+
9
+ print("Device:", device)
10
+ if device == 'cuda':
11
+ print(torch.cuda.get_device_name(0))
12
+
13
  origin_model_path = "mistralai/Mistral-7B-Instruct-v0.1"
14
  model_path = "filipealmeida/Mistral-7B-Instruct-v0.1-sharded"
15
  bnb_config = BitsAndBytesConfig \