Git Product home page Git Product logo

translate-pdf's Introduction

多功能PDF翻译器

这个Gradio应用结合了PDF显示和文本翻译功能,方便用户进行多语言文档处理。

在线体验链接HF-space

主要功能

  • PDF显示:
    • 用户可以通过上传或文件浏览器选择本地PDF文件。
    • 应用将PDF文件转换为base64编码并在iframe中显示,方便用户浏览。
  • 文本翻译:
    • 用户可以从PDF文件中复制文本或手动输入文本框进行翻译。
    • 支持中英文之间的双向翻译。
    • 用户可以选择源语言和目标语言。
    • 翻译结果以对话形式显示在聊天框中,方便用户查看历史记录。
    • 提供清空文本框和聊天框的功能。

使用方法

  1. 上传PDF文件或使用文件浏览器选择本地PDF文件。
  2. 在“文本翻译”选项卡中,选择源语言和目标语言。
  3. 在文本框中输入要翻译的文本,或从PDF文件中复制文本粘贴到文本框中。
  4. 点击“翻译”按钮,翻译结果将显示在聊天框中。
  5. 点击“清空”按钮可以清空文本框和聊天框。

技术实现

  • 使用gradio构建用户界面。
  • 使用base64模块对PDF文件进行编码,以便在iframe中显示。
  • 使用gradio_client调用远程机器学习模型进行文本翻译。
  • 使用chatbot组件以对话形式展示翻译结果。

未来展望

  • 支持更多语言的翻译。
  • 实现PDF文件内容的批量翻译。
  • 添加文本编辑功能,方便用户修改翻译结果。
  • 支持用户自定义翻译模型。

界面

pdf

translate

translate-pdf's People

Contributors

moyanxinxu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.