Spaces:
Runtime error
Runtime error
File size: 537 Bytes
512dabf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import gradio as gr
def dummy_translate(pdf_file):
return "目前只是一个占位函数,稍后实现真正翻译逻辑。"
with gr.Blocks() as demo:
gr.Markdown("# PDF 英文翻译器(开发中)")
with gr.Row():
pdf_input = gr.File(label="上传英文 PDF 文件", file_types=[".pdf"])
translate_button = gr.Button("开始翻译")
output_text = gr.Textbox(label="翻译后内容", lines=10)
translate_button.click(fn=dummy_translate, inputs=pdf_input, outputs=output_text)
demo.launch()
|