From acd78539864c6034c3e97058e55e2d01a038a799 Mon Sep 17 00:00:00 2001 From: William Jin Date: Sun, 22 Sep 2024 22:27:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20gradio=20=E8=87=AA?= =?UTF-8?q?=E5=B8=A6=E5=A4=8D=E5=88=B6=E5=88=B0=E5=89=AA=E8=B4=B4=E6=9D=BF?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chyoso_toolkit_ui.py | 16 +++++----------- requirements.txt | 3 +-- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/chyoso_toolkit_ui.py b/chyoso_toolkit_ui.py index 7bf8006..208ad2c 100644 --- a/chyoso_toolkit_ui.py +++ b/chyoso_toolkit_ui.py @@ -2,8 +2,6 @@ import gradio as gr import subprocess import os import re -import clipman -clipman.init() def convert_to_wav(audio_file): @@ -204,18 +202,14 @@ with gr.Blocks() as iface: with gr.Tab("下载pdf"): gr.Markdown("## pdf 下载指令修复") with gr.Row(): - with gr.Column(): - power_shell_text_input = gr.Textbox(lines=15, placeholder="请在此输入power shell 脚本...") - with gr.Column(): - power_shell_pdf_button = gr.Button("转换") - power_shell_pdf_copy_button = gr.Button("复制") - status_text = gr.Textbox(label="Status") - with gr.Column(): - power_shell_text_output = gr.Textbox(lines=15, placeholder="这里会显示结果") + power_shell_text_input = gr.Textbox(lines=10, placeholder="请在此输入power shell 脚本...") + with gr.Row(): + power_shell_pdf_button = gr.Button("转换") + with gr.Row(): + power_shell_text_output = gr.Textbox(lines=10, placeholder="这里会显示结果", show_copy_button=True) power_shell_pdf_button.click(power_shell_pdf_download, inputs=power_shell_text_input, outputs=power_shell_text_output) - power_shell_pdf_copy_button.click(fn=copy_text, inputs=power_shell_text_output, outputs=status_text) iface.load(fn=update_log_output, outputs=[log_output], every=1) diff --git a/requirements.txt b/requirements.txt index a56aaea..45093b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -gradio==4.44.0 -clipman~=3.3.1 \ No newline at end of file +gradio==4.44.0 \ No newline at end of file