- pull from docker and used free llama 3
docker pull codewithdark/llama3-hackathon:new
LLaMA Genius is an AI-powered research assistant designed to help users interact with and extract insights from various sources, including uploaded files and web content. This application leverages advanced AI models to provide meaningful responses, generate ideas, and fetch relevant articles and videos.
- File Upload: Allows users to upload PDF, DOCX, and TXT files.
- File Reading: Reads and extracts text from the uploaded files.
- Text Chunking: Splits the text into manageable chunks for processing.
- AI Interaction: Users can either chat with the file content or generate ideas/text about the file using an AI model.
- Navigation: Links to navigate back to the home page and to the "Chat with Web" feature.
- Query Input: Users can input a query to get responses.
- AI Response: Generates a response to the user's query using an AI model.
- Article Fetching: Fetches articles related to the query using Google search.
- YouTube Videos: Fetches YouTube videos related to the query.
- Sources Display: Displays the fetched articles and videos.
- Navigation: Links to navigate back to the home page and to the "Chat with File" feature.
- Chat History: Displays the chat history of the user.
- Sources Display: Displays the fetched articles and videos.
- Navigation: Links to navigate back to the home page and to the "Chat with File" feature.
- Go to the "Chat with File" page.
- Upload a file (PDF, DOCX, or TXT).
- Choose to either chat with the file content or generate ideas/text about the file.
- If chatting, input your query and get responses based on the file content.
- If generating ideas, get summarized ideas or text about the file content.
- Go to the "Chat with Web" page.
- Input your query in the chat box.
- Get AI-generated responses along with related articles and YouTube videos.
- Explore sources by expanding the 'Sources' and 'Video Sources' sections.
- Go to the "Chat with Web" page.
- Input your query in the chat box.
- Get AI-generated responses along with related articles and YouTube videos.
- Explore sources by expanding the 'Sources' and 'Video Sources' sections.
- Click on the 'See the Chat with web History' button to see the chat history of the user.
- Click on the 'Sources' button to see the fetched articles and YouTube videos.
- Click on the 'Back to home' button to navigate back to the home page.
- Click on the 'Back to Chat with Web' button to navigate back to the "Chat with web" page.
To run this application locally, follow these steps:
-
Clone the repository:
git clone https://github.com/codewithdark-git/llama-genius.git cd llama-genius
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run app.py
app.py
: The main entry point of the application. It contains the home page with navigation links and documentation.pages/chatWithFile.py
: Handles the "Chat with File" functionality, including file upload, text extraction, and AI interaction.pages/chatWithWeb.py
: Handles the "Chat with Web" functionality, including query input, AI response, and fetching related articles and YouTube videos.pages/style.css
: Custom CSS for styling the application.pages/history.py
: Handles the "See the Chat with web History" functionality, including fetching related articles and YouTube videos.utils/models.py
: Contains the DataBase logic for the application.utils/llm.py
: Contains the logic for the AI model to Generate Response.utils/helper.py
: Contains helper functions for the application.utils/common.py
: Contains common functions for the application.
We welcome contributions from the community! If you're interested in contributing to LLaMA Genius, please follow these steps:
-
Fork the repository: Click the "Fork" button at the top right corner of this repository to create a copy of it in your GitHub account.
-
Clone your forked repository:
-
Create a new branch: Create a new branch for your feature or bugfix.
git checkout -b feature-name
-
Make your changes: Implement your feature or fix the bug. Ensure your code follows the project's coding standards.
-
Commit your changes: Write a clear and concise commit message.
git add . git commit -m "Description of the feature or fix"
-
Push to your branch:
git push origin feature-name
-
Create a Pull Request: Go to the original repository and click on the "New Pull Request" button. Provide a detailed description of your changes and submit the pull request.
- Code Quality: Ensure your code is well-documented and follows the project's coding standards.
- Testing: Test your changes thoroughly before submitting a pull request.
- Issue Reporting: If you find a bug or have a feature request, please create an issue in the issue tracker.
- Discussions: Feel free to start a discussion in the issues or pull requests if you have any questions or need clarification.
MIT