Gijs Wijngaard
commited on
Commit
Β·
6f64d8d
1
Parent(s):
5bb5fa5
init
Browse files
app.py
CHANGED
|
@@ -2,7 +2,6 @@ import spaces
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
import soundfile as sf
|
| 5 |
-
import torch
|
| 6 |
from transformers import AutoModelForCausalLM, AutoProcessor
|
| 7 |
|
| 8 |
|
|
@@ -14,7 +13,6 @@ processor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)
|
|
| 14 |
model = AutoModelForCausalLM.from_pretrained(
|
| 15 |
model_path,
|
| 16 |
device_map="auto",
|
| 17 |
-
dtype=torch.float16,
|
| 18 |
trust_remote_code=True,
|
| 19 |
_attn_implementation="flash_attention_2",
|
| 20 |
)
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
import soundfile as sf
|
|
|
|
| 5 |
from transformers import AutoModelForCausalLM, AutoProcessor
|
| 6 |
|
| 7 |
|
|
|
|
| 13 |
model = AutoModelForCausalLM.from_pretrained(
|
| 14 |
model_path,
|
| 15 |
device_map="auto",
|
|
|
|
| 16 |
trust_remote_code=True,
|
| 17 |
_attn_implementation="flash_attention_2",
|
| 18 |
)
|