Raghavan1988 commited on
Commit
c5fff41
1 Parent(s): 25734b6

adding Gradio Client to call seamless_mt

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -11,6 +11,9 @@ import dotenv
11
  from transformers import AutoProcessor, SeamlessM4TModel
12
  import torchaudio
13
  dotenv.load_dotenv()
 
 
 
14
 
15
 
16
  AUDIO_SAMPLE_RATE = 16000.0
@@ -251,7 +254,7 @@ iface = gr.Interface(
251
  inputs=[
252
  gr.Textbox(label="Input Text"),
253
  gr.Image(label="Upload Image"),
254
- gr.Audio(sources="microphone"),
255
  ],
256
  outputs=[gr.Markdown(label="Output Text")],
257
  title="👋🏻Welcome to ⚕🗣️😷MultiMed - Access Chat ⚕🗣️😷",
 
11
  from transformers import AutoProcessor, SeamlessM4TModel
12
  import torchaudio
13
  dotenv.load_dotenv()
14
+ from gradio_client import Client
15
+
16
+ client = Client("https://facebook-seamless-m4t.hf.space/--replicas/frq8b/")
17
 
18
 
19
  AUDIO_SAMPLE_RATE = 16000.0
 
254
  inputs=[
255
  gr.Textbox(label="Input Text"),
256
  gr.Image(label="Upload Image"),
257
+ gr.Audio(label="talk", type="filepath", sources="microphone", visible=False),
258
  ],
259
  outputs=[gr.Markdown(label="Output Text")],
260
  title="👋🏻Welcome to ⚕🗣️😷MultiMed - Access Chat ⚕🗣️😷",