Git Product home page Git Product logo

yfc0254 / deepseek-chatbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from u10if/deepseek-chatbot

0.0 0.0 0.0 7 KB

This is a Python script that uses the Streamlit library to create a web application for rewriting text from uploaded files using the DeepSeek API. The script imports necessary libraries and defines several functions to handle file uploads, text extraction, text splitting, and text rewriting.

License: MIT License

Python 100.00%

deepseek-chatbot's Introduction

deepseek-chatbot by kiarash

This is a Python script that uses the Streamlit library to create a web application for rewriting text from uploaded files using the DeepSeek API. The script imports necessary libraries and defines several functions to handle file uploads, text extraction, text splitting, and text rewriting.

DeepSeek Document Rewriter

This is a Streamlit-based web application that allows users to upload documents (PDF, DOCX, and CSV) and rewrite the text content using the DeepSeek AI API. The application extracts text from the uploaded files, splits it into chunks, and sends each chunk to the DeepSeek API for rewriting. The rewritten text is then displayed in the app and can be downloaded as a text file.

Features

  • Upload multiple files (PDF, DOCX, and CSV)
  • Extract text from uploaded files
  • Split text into manageable chunks
  • Rewrite text using the DeepSeek AI API
  • Display the rewritten text
  • Download the rewritten text as a text file

Requirements

To run this application, you need to have the following libraries installed:

  • streamlit
  • os
  • PyPDF2
  • docx
  • langchain
  • requests
  • python-docx (for DOCX support)

You also need to have a DeepSeek API key.

Installation

  1. Clone the repository:
git clone https://github.com/u10if/deepseek-chatbot.git
  1. Navigate to the project directory:
cd deepseek-document-rewriter
  1. Install the required libraries:
pip install -r requirements.txt
  1. Replace "deepseek api" in the script with your actual DeepSeek API key.

Usage

  1. Run the Streamlit app:
streamlit run main.py
  1. Open your web browser and go to the URL provided by Streamlit.
  2. Upload your files (PDF, DOCX, and CSV) by clicking the "Choose files" button.
  3. The app will extract the text from the files, split it into chunks, and send each chunk to the DeepSeek API for rewriting.
  4. The rewritten text will be displayed in the app.
  5. Click the "Download Rewritten Text" button to download the rewritten text as a text file.

Contributing

Contributions are welcome! If you find any issues or want to add new features, please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

deepseek-chatbot's People

Contributors

u10if 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.