Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,6 +41,24 @@ with gr.Blocks() as demo:
|
|
| 41 |
show_copy_button=True,
|
| 42 |
)
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
with gr.Tab('upload'):
|
| 45 |
gr.Markdown('name単位でsearchできます。行ごとにchunkになります。')
|
| 46 |
upload_name = gr.Textbox(
|
|
@@ -132,6 +150,12 @@ with gr.Blocks() as demo:
|
|
| 132 |
outputs=[bs4_result],
|
| 133 |
)
|
| 134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
upload_button.click(
|
| 136 |
fn=fn.upload,
|
| 137 |
inputs=[upload_name, upload_filename, upload_content],
|
|
|
|
| 41 |
show_copy_button=True,
|
| 42 |
)
|
| 43 |
|
| 44 |
+
with gr.Tab('md'):
|
| 45 |
+
md_url = gr.Textbox(
|
| 46 |
+
lines=1,
|
| 47 |
+
label='URL',
|
| 48 |
+
interactive=True,
|
| 49 |
+
show_copy_button=True,
|
| 50 |
+
)
|
| 51 |
+
md_button = gr.Button(
|
| 52 |
+
variant='primary',
|
| 53 |
+
value='Scraping',
|
| 54 |
+
)
|
| 55 |
+
md_result = gr.Textbox(
|
| 56 |
+
lines=20,
|
| 57 |
+
label='Result',
|
| 58 |
+
interactive=True,
|
| 59 |
+
show_copy_button=True,
|
| 60 |
+
)
|
| 61 |
+
|
| 62 |
with gr.Tab('upload'):
|
| 63 |
gr.Markdown('name単位でsearchできます。行ごとにchunkになります。')
|
| 64 |
upload_name = gr.Textbox(
|
|
|
|
| 150 |
outputs=[bs4_result],
|
| 151 |
)
|
| 152 |
|
| 153 |
+
md_button.click(
|
| 154 |
+
fn=fn.md,
|
| 155 |
+
inputs=[md_url],
|
| 156 |
+
outputs=[md_result],
|
| 157 |
+
)
|
| 158 |
+
|
| 159 |
upload_button.click(
|
| 160 |
fn=fn.upload,
|
| 161 |
inputs=[upload_name, upload_filename, upload_content],
|