admin commited on
Commit
a07a8b2
·
1 Parent(s): 9f2c3ca

only leave mode1

Browse files
Files changed (1) hide show
  1. app.py +40 -40
app.py CHANGED
@@ -130,45 +130,45 @@ def url_infer(song: str, cache_dir="./__pycache__/mode2"):
130
  if __name__ == "__main__":
131
  with gr.Blocks() as iface:
132
  gr.Markdown("# Piano Transcription Tool")
133
- with gr.Tab("Uploading Mode"):
134
- gr.Interface(
135
- fn=upl_infer,
136
- inputs=gr.Audio(
137
- label="Upload an audio",
138
- type="filepath",
139
- ),
140
- outputs=[
141
- gr.File(label="Download MIDI"),
142
- gr.File(label="Download PDF score"),
143
- gr.File(label="Download MusicXML"),
144
- gr.File(label="Download MXL"),
145
- gr.Textbox(label="ABC notation", show_copy_button=True),
146
- gr.Image(label="Staff", type="filepath"),
147
- ],
148
- description="Please make sure the audio is completely uploaded before clicking Submit",
149
- flagging_mode="never",
150
- )
151
-
152
- with gr.Tab("Direct Link Mode"):
153
- gr.Interface(
154
- fn=url_infer,
155
- inputs=gr.Textbox(
156
- label="Input audio direct link",
157
- placeholder="https://music.163.com/#/song?id=",
158
- ),
159
- outputs=[
160
- gr.Audio(label="Download audio", type="filepath"),
161
- gr.File(label="Download MIDI"),
162
- gr.File(label="Download PDF score"),
163
- gr.File(label="Download MusicXML"),
164
- gr.File(label="Download MXL"),
165
- gr.Textbox(label="ABC notation", show_copy_button=True),
166
- gr.Image(label="Staff", type="filepath"),
167
- ],
168
- description="For Netease Cloud music, you can directly input the non-VIP song page link",
169
- examples=["1945798894", "1945798973", "1946098771"],
170
- flagging_mode="never",
171
- cache_examples=False,
172
- )
173
 
174
  iface.launch()
 
130
  if __name__ == "__main__":
131
  with gr.Blocks() as iface:
132
  gr.Markdown("# Piano Transcription Tool")
133
+ # with gr.Tab("Uploading Mode"):
134
+ gr.Interface(
135
+ fn=upl_infer,
136
+ inputs=gr.Audio(
137
+ label="Upload an audio",
138
+ type="filepath",
139
+ ),
140
+ outputs=[
141
+ gr.File(label="Download MIDI"),
142
+ gr.File(label="Download PDF score"),
143
+ gr.File(label="Download MusicXML"),
144
+ gr.File(label="Download MXL"),
145
+ gr.Textbox(label="ABC notation", show_copy_button=True),
146
+ gr.Image(label="Staff", type="filepath"),
147
+ ],
148
+ description="Please make sure the audio is completely uploaded before clicking Submit",
149
+ flagging_mode="never",
150
+ )
151
+
152
+ # with gr.Tab("Direct Link Mode"):
153
+ # gr.Interface(
154
+ # fn=url_infer,
155
+ # inputs=gr.Textbox(
156
+ # label="Input audio direct link",
157
+ # placeholder="https://music.163.com/#/song?id=",
158
+ # ),
159
+ # outputs=[
160
+ # gr.Audio(label="Download audio", type="filepath"),
161
+ # gr.File(label="Download MIDI"),
162
+ # gr.File(label="Download PDF score"),
163
+ # gr.File(label="Download MusicXML"),
164
+ # gr.File(label="Download MXL"),
165
+ # gr.Textbox(label="ABC notation", show_copy_button=True),
166
+ # gr.Image(label="Staff", type="filepath"),
167
+ # ],
168
+ # description="For Netease Cloud music, you can directly input the non-VIP song page link",
169
+ # examples=["1945798894", "1945798973", "1946098771"],
170
+ # flagging_mode="never",
171
+ # cache_examples=False,
172
+ # )
173
 
174
  iface.launch()