Giter Site home page Giter Site logo

drugrepochat's Introduction

DrugRepoChatter: AI-Powered Assistant for Academic Research in Drug Discovery

Introduction

The challenge of keeping pace with the exponential growth of scientific literature is a significant obstacle in drug discovery research. To address this challenge, we have developed DrugRepoChatter, an AI-powered assistant designed to facilitate efficient and accurate information retrieval within a large corpus of scientific documents.

Description

DrugRepoChatter aims to assist researchers in finding relevant information within a large corpus of scientific documents. By leveraging advanced AI techniques, it provides researchers with a streamlined method to search and access scientific literature relevant to their work, improving the efficiency and effectiveness of the research process.

Configuration

To configure the knowledge base, navigate to the "Configure Knowledge Base" page. Here, you can upload PDFs which will be used to form the new knowledge base. You can also select an existing knowledge base or delete one.

Note: A few knowledge bases are protected and cannot be deleted.

Requirements

  • Streamlit for the frontend interface.
  • Docker for containerization.

Installation

  1. Clone the Repository:

    git clone https://github.com/fmdelgado/drugrepochat.git
    cd drugrepochat
  2. Prepare the Environment File:

    • Use the provided env_prod file, rename it to .env, and place it in the app directory.
  3. Build and Run the Docker Containers:

    docker-compose up --build -d

Note: In the terminal where you ran the docker-compose command, some logs may occur, but they shouldn’t be of your concern as long as the application is running properly. In the beginning, you might have to wait a bit until everything has loaded.

Running the Application

  1. Open your browser and navigate to http://localhost:8501. The application should be running and accessible from this URL.

Acknowledgements

Availability of supporting data: manuscript in preparation

Code availability: DrugRepoChatter GitHub Repository

Competing interests: The authors declare no conflicts of interest.

Funding: This work is supported by the European Union’s Horizon Europe research and innovation programme under grant agreement No. 101057619.

Additional Information

Troubleshooting:

  • Ensure Docker is installed and running on your machine.
  • Verify that the .env file is correctly placed and configured.
  • If you encounter issues, check the Docker logs for more details.

Contact: For further information or support, please reach out to the project maintainers through the GitHub repository.

drugrepochat's People

Contributors

fmdelgado avatar andimajore avatar lspindler2509 avatar

Watchers

 avatar  avatar

drugrepochat's Issues

API key as a global variable

Storing API keys securely is crucial, especially when dealing with an online website where exposure could lead to malicious activities. Right now, the user API key is stored in a file, but we should consider safer options:

  1. Environment Variables: Store API keys as environment variables on the server that's hosting your application. These variables are only accessible to the application's processes and are not exposed in client-side code.
  2. Server-Side Proxy: Create a server-side proxy that handles all requests requiring the API key. The client-side application sends requests to the proxy, which then adds the API key and forwards the request to the external service.
  3. Configuration Management Tools: Use configuration management tools (e.g., Ansible, Chef) to manage and securely deploy secrets to your servers.
  4. Avoid Hardcoding in Codebase: Never hardcode API keys directly in your codebase, especially in client-side code like JavaScript, as it can be easily viewed by anyone accessing your website.
  5. File with Restricted Permissions: If you're not using environment variables, store the keys in a file with restricted permissions on your server, and ensure that the file is not part of the web-accessible directories.
  6. Use HTTPS: Always use HTTPS for transmitting data to ensure that the keys are encrypted during transmission.
  7. Monitoring and Alerting: Set up monitoring and alerting on the usage of the API keys to detect any unusual or unauthorized activities.

Docker image not running

The Streamlit application inside a Docker container is not running or the port is not working, there could be several potential issues at play. @AndiMajore could you please have a look at these potential solutions just to be completely sure it's not a code problem? Mahdi told me about the port 8501 by default so maybe it's about this.

  1. Expose the Correct Port: Make sure to expose the port that Streamlit is running on (by default, it's 8501). In your Dockerfile, add the following line:
EXPOSE 8501
  1. Run the Docker Container with Port Mapping: When running the Docker container, map the internal port to an external port using the -p flag:
docker run -p 8501:8501 your_image_name
  1. Configure Streamlit for Network Access: If the app is still not accessible, it might be related to Streamlit's networking configuration. You can set the --server.address parameter to 0.0.0.0 to allow connections from outside the container:
CMD streamlit run --server.address 0.0.0.0 app.py
  1. Check for Errors: Look at the Docker container logs to check for any errors:
docker logs your_container_id
  1. Firewall and Security Rules: Ensure that there are no firewall or security rules blocking access to the port you're using.
    1.Check the Browser and URL: Try accessing the app using different browsers or ensure that you are accessing the correct URL, typically http://localhost:8501.

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.