DavidLoccus commited on
Commit
17dce5b
·
1 Parent(s): 541ae6f

Update layout to remove video and youtube.

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. app.py +7 -7
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
- title: Audiofakedetection Demo
3
- emoji: 📊
4
  colorFrom: gray
5
  colorTo: pink
6
  sdk: gradio
 
1
  ---
2
+ title: Voice Cloning Detection Demo
3
+ emoji: 🕵️‍♂️
4
  colorFrom: gray
5
  colorTo: pink
6
  sdk: gradio
app.py CHANGED
@@ -17,7 +17,6 @@ MAX_SIZE = FS * 30
17
  HF_TOKEN_DEMO=os.getenv("HF_TOKEN_DEMO")
18
  MODEL_REPO=os.getenv("MODEL_REPO")
19
  MODELNAME=os.getenv("MODELNAME")
20
- MODELNAME2=os.getenv("MODELNAME2")
21
  username=os.getenv("username")
22
  password=os.getenv("password")
23
 
@@ -26,7 +25,7 @@ hf_api = HfApi(
26
  token=HF_TOKEN_DEMO, # Token is not persisted on the machine.
27
  )
28
 
29
- modelfile = hf_api.hf_hub_download(MODEL_REPO,MODELNAME2)
30
  MODEL = torch.jit.load(modelfile)
31
 
32
 
@@ -161,8 +160,8 @@ with gr.Blocks(title="Audio Fake Detector") as demo:
161
  with gr.Column():
162
  m = gr.Audio(source="microphone", type="numpy",label="Micro")
163
  f = gr.Audio(source="upload", type="filepath", label="Audio file")
164
- y = gr.Textbox(label="Enter YouTube address here")
165
- v = gr.Video(label="Enter a video", include_audio=True, scale=0.5)
166
 
167
  with gr.Column():
168
  with gr.Row(equal_height=True):
@@ -170,11 +169,12 @@ with gr.Blocks(title="Audio Fake Detector") as demo:
170
  text = gr.Textbox(label="Probability of Real Voice")
171
 
172
  #file= gr.Audio(source="upload", type="filepath", optional=True)
173
- button_clear = gr.ClearButton([m,f,y,v,text])
 
174
  m.stop_recording(process_micro, inputs=[m], outputs=text)
175
  f.upload(process_file,inputs=[f], outputs=text)
176
- y.submit(process_youtube, inputs=[y], outputs=text)
177
- v.upload(process_video, inputs=[v], outputs=[text])
178
 
179
  with gr.Tab("Batch Processing"):
180
  gr.Markdown("# Welcome to Loccus.ai synthetic voice detection demo!")
 
17
  HF_TOKEN_DEMO=os.getenv("HF_TOKEN_DEMO")
18
  MODEL_REPO=os.getenv("MODEL_REPO")
19
  MODELNAME=os.getenv("MODELNAME")
 
20
  username=os.getenv("username")
21
  password=os.getenv("password")
22
 
 
25
  token=HF_TOKEN_DEMO, # Token is not persisted on the machine.
26
  )
27
 
28
+ modelfile = hf_api.hf_hub_download(MODEL_REPO,MODELNAME)
29
  MODEL = torch.jit.load(modelfile)
30
 
31
 
 
160
  with gr.Column():
161
  m = gr.Audio(source="microphone", type="numpy",label="Micro")
162
  f = gr.Audio(source="upload", type="filepath", label="Audio file")
163
+ #y = gr.Textbox(label="Enter YouTube address here")
164
+ #v = gr.Video(label="Enter a video", include_audio=True, scale=0.5)
165
 
166
  with gr.Column():
167
  with gr.Row(equal_height=True):
 
169
  text = gr.Textbox(label="Probability of Real Voice")
170
 
171
  #file= gr.Audio(source="upload", type="filepath", optional=True)
172
+ #button_clear = gr.ClearButton([m,f,y,v,text])
173
+ button_clear = gr.ClearButton([m,f,text])
174
  m.stop_recording(process_micro, inputs=[m], outputs=text)
175
  f.upload(process_file,inputs=[f], outputs=text)
176
+ #y.submit(process_youtube, inputs=[y], outputs=text)
177
+ #v.upload(process_video, inputs=[v], outputs=[text])
178
 
179
  with gr.Tab("Batch Processing"):
180
  gr.Markdown("# Welcome to Loccus.ai synthetic voice detection demo!")