Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -922,4 +922,25 @@ gr.Interface(
|
|
| 922 |
],
|
| 923 |
outputs=gr.Text(label="Processed Audio as Base64 URL"),
|
| 924 |
allow_flagging="never"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 925 |
).launch(inline=False, share=False)
|
|
|
|
| 922 |
],
|
| 923 |
outputs=gr.Text(label="Processed Audio as Base64 URL"),
|
| 924 |
allow_flagging="never"
|
| 925 |
+
|
| 926 |
+
# Standalone API Interface
|
| 927 |
+
api_iface = gr.Interface(
|
| 928 |
+
fn=hf_api_process,
|
| 929 |
+
inputs=[
|
| 930 |
+
gr.Text(label="Audio Base64 Data URL"),
|
| 931 |
+
gr.JSON(label="Effects (JSON)"),
|
| 932 |
+
gr.Checkbox(label="Isolate Vocals"),
|
| 933 |
+
gr.Textbox(label="Preset"),
|
| 934 |
+
gr.Textbox(label="Export Format")
|
| 935 |
+
],
|
| 936 |
+
outputs=gr.JSON(label="Response"),
|
| 937 |
+
allow_flagging="never",
|
| 938 |
+
title="AudioMaster API"
|
| 939 |
+
)
|
| 940 |
+
|
| 941 |
+
# Add to demo
|
| 942 |
+
demo.queue()
|
| 943 |
+
demo.launch()
|
| 944 |
+
api_iface.launch(share=False, inline=False)
|
| 945 |
+
|
| 946 |
).launch(inline=False, share=False)
|