alibidaran
commited on
Commit
•
adabe49
1
Parent(s):
8be2999
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
|
|
4 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
5 |
tokenizer = AutoTokenizer.from_pretrained("alibidaran/medical_transcription_generator")
|
6 |
|
7 |
-
model = AutoModelForCausalLM.from_pretrained("alibidaran/medical_transcription_generator",use_safetensors=True
|
8 |
def generate_text(Text,Max_length,Temperature):
|
9 |
torch.manual_seed(32)
|
10 |
tokenizer.pad_token_id=tokenizer.eos_token_id
|
|
|
4 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
5 |
tokenizer = AutoTokenizer.from_pretrained("alibidaran/medical_transcription_generator")
|
6 |
|
7 |
+
model = AutoModelForCausalLM.from_pretrained("alibidaran/medical_transcription_generator",use_safetensors=True).to(device)
|
8 |
def generate_text(Text,Max_length,Temperature):
|
9 |
torch.manual_seed(32)
|
10 |
tokenizer.pad_token_id=tokenizer.eos_token_id
|