Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
304180d
1
Parent(s):
7985f98
code
Browse files- app.py +10 -0
- requirements.txt +2 -0
app.py
CHANGED
@@ -1,4 +1,14 @@
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
def greet(name):
|
4 |
return "Hello " + name + "!!"
|
|
|
1 |
import gradio as gr
|
2 |
+
from gradio_webrtc import WebRTC, AdditionalOutputs
|
3 |
+
|
4 |
+
from io import BytesIO
|
5 |
+
from urllib.request import urlopen
|
6 |
+
import librosa
|
7 |
+
from transformers import Qwen2AudioForConditionalGeneration, AutoProcessor
|
8 |
+
|
9 |
+
processor = AutoProcessor.from_pretrained("Qwen/Qwen2-Audio-7B-Instruct")
|
10 |
+
model = Qwen2AudioForConditionalGeneration.from_pretrained("Qwen/Qwen2-Audio-7B-Instruct", device_map="auto")
|
11 |
+
|
12 |
|
13 |
def greet(name):
|
14 |
return "Hello " + name + "!!"
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
gradio_webrtc[vad]==0.0.11a1
|
2 |
+
transformers@git+https://github.com/huggingface/transformers
|