Kangarroar commited on
Commit
5e81135
1 Parent(s): 4ba4c7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py CHANGED
@@ -9,7 +9,21 @@ import torchcrepe
9
  from infer import *
10
  import logging
11
  from infer_tools.infer_tool import *
 
 
12
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  ##EDIT FOR CPU
15
  # Open the file and read it into a string
 
9
  from infer import *
10
  import logging
11
  from infer_tools.infer_tool import *
12
+ import gradio as gr
13
+ import transformers
14
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
15
+ # define the input interface for the app
16
+ inputs = gr.inputs.Textbox(lines=1, label="Enter a link:")
17
+ inputs += gr.inputs.Audio(label="Upload a WAV file:")
18
+
19
+ # define the output interface for the app
20
+ outputs = gr.outputs.Textbox(lines=1, label="Diff-SVC prediction:")
21
+
22
+ # define the app itself
23
+ app = gr.Interface(model, inputs, outputs, title="DIFF-SVC Inference Cloud")
24
+
25
+ # run the app
26
+ app.launch()
27
 
28
  ##EDIT FOR CPU
29
  # Open the file and read it into a string