datascientist22 commited on
Commit
15a7d9b
·
verified ·
1 Parent(s): 709bbfd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +77 -0
README.md CHANGED
@@ -10,3 +10,80 @@ pinned: false
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
13
+
14
+ # 🤖 Chatbot with URL-based Document Retrieval
15
+
16
+ This Streamlit app is designed to provide a chatbot interface for querying content from a blog post URL. It utilizes various NLP models to retrieve and summarize relevant content based on user queries.
17
+
18
+ ## Features
19
+
20
+ - **URL Input**: Allows users to input the URL of a blog post.
21
+ - **API Key Input**: Users can either use pre-provided API keys or enter their own.
22
+ - **Chat Interface**: Users can ask questions related to the content of the blog post.
23
+ - **Dynamic Styling**: Includes colorful, animated backgrounds and a stylish sidebar.
24
+ - **Response Generation**: Uses models to retrieve and summarize content related to the query.
25
+
26
+ ## Installation
27
+
28
+ To run this app, ensure you have Python installed, then install the necessary packages using the provided `requirements.txt` file.
29
+
30
+ 1. **Clone the repository**:
31
+ ```bash
32
+ git clone https://github.com/mldatascientist23/Generative_AI_Projects.git
33
+ ```
34
+
35
+ 2. **Navigate to the project directory**:
36
+ ```bash
37
+ cd your-repository
38
+ ```
39
+
40
+ 3. **Create and activate a virtual environment** (optional but recommended):
41
+ ```bash
42
+ python -m venv env
43
+ source env/bin/activate # On Windows use: .\env\Scripts\activate
44
+ ```
45
+
46
+ 4. **Install the required packages**:
47
+ ```bash
48
+ pip install -r requirements.txt
49
+ ```
50
+
51
+ ## Usage
52
+
53
+ 1. **Run the Streamlit app**:
54
+ ```bash
55
+ streamlit run app.py
56
+ ```
57
+
58
+ 2. **Access the app**:
59
+ Open a web browser and navigate to `https://huggingface.co/spaces/datascientist22/blogpostQA-retrieval-bot` to interact with the chatbot.
60
+
61
+ ### Sidebar Configuration
62
+
63
+ - **Enter Blog Post URL**: Input the URL of the blog post you want to retrieve data from.
64
+ - **Use pre-provided API keys**: Check this box if you want to use pre-provided API keys. If unchecked, enter your own API keys.
65
+ - **API Key Fields**: Enter your LangChain and Groq API keys if not using pre-provided keys.
66
+
67
+ ### Main Interface
68
+
69
+ - **Ask a question based on the blog post**: Type your question in the input field and click "Submit Query" to get a response based on the content of the blog post.
70
+
71
+ ## Error Handling
72
+
73
+ - **URL Validation**: Ensure that the URL is valid before submitting.
74
+ - **API Key Submission**: Both API keys must be provided unless using pre-provided keys.
75
+
76
+ ## Notes
77
+
78
+ - Ensure that the `requirements.txt` file includes the necessary libraries, such as `streamlit`, `langchain`, `langchain_chroma`, `langchain_community`, `langchain_core`, `langchain_text_splitters`, `sentence_transformers`, `torch`, and `transformers`.
79
+ - The app uses the `facebook/bart-large-cnn` model for summarization, and `SentenceTransformer` for embedding.
80
+
81
+ ## License
82
+
83
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
84
+
85
+ ## Author
86
+
87
+ - **Created by [Engr. Hamesh Raj](https://www.linkedin.com/in/datascientisthameshraj/)**
88
+
89
+ Feel free to open an issue or submit a pull request if you have any questions or suggestions!