Mateo4 commited on
Commit
ecff91c
·
verified ·
1 Parent(s): d8435a1

Update README.md

Browse files

a little change occured hope working

Files changed (1) hide show
  1. README.md +38 -13
README.md CHANGED
@@ -1,24 +1,49 @@
 
 
 
 
 
 
 
 
 
 
1
  # Gemini RAG Chatbot for ML Theory
2
 
3
- This Hugging Face Space hosts a Retrieval-Augmented Generation (RAG) chatbot designed for Machine Learning theory, drawing information from uploaded PDF documents. It utilizes Google's Gemini API for language generation and Sentence Transformers with FAISS for efficient document retrieval.
4
 
5
  ## How to Use
6
 
7
- 1. **Set up your GEMINI_API_KEY**: Before running, ensure you have set your Google Gemini API key as a Space Secret named `GEMINI_API_KEY`.
8
- 2. **Upload Documents**: Use the "Upload PDF Documents" button to upload your PDF files containing ML theory content.
9
- 3. **Ask Questions**: Once documents are processed, type your questions in the chat interface.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  ## Dependencies
12
 
13
- The core dependencies for this application are:
14
- * `google-generativeai`
15
- * `sentence-transformers`
16
  * `faiss-cpu`
17
  * `PyMuPDF`
18
- * `gradio`
 
19
  * `numpy`
20
-
21
- ## Model Used
22
-
23
- * **LLM**: `models/gemini-2.0-flash`
24
- * **Embeddings**: `all-MiniLM-L6-v2` (from Sentence Transformers)
 
1
+ ---
2
+ license: mit
3
+ title: ML Assistanct
4
+ sdk: gradio
5
+ emoji: 📚
6
+ colorFrom: gray
7
+ colorTo: green
8
+ short_description: This is ML Assistant for Machine Learning Course of Soleyman
9
+ ---
10
+
11
  # Gemini RAG Chatbot for ML Theory
12
 
13
+ This Hugging Face Space hosts a Retrieval-Augmented Generation (RAG) chatbot designed for Machine Learning theory. It allows you to upload your own PDF documents, and then ask questions about their content. The chatbot utilizes Google's Gemini API for language generation and Sentence Transformers with FAISS for efficient document retrieval.
14
 
15
  ## How to Use
16
 
17
+ 1. **Set up your GEMINI_API_KEY**:
18
+ * Go to your Space on Hugging Face.
19
+ * Navigate to the "Settings" tab.
20
+ * Scroll down to "Space secrets".
21
+ * Add a new secret with the name `GEMINI_API_KEY` and paste your actual Google Gemini API key as its value. This is crucial for the app to function.
22
+
23
+ 2. **Upload Documents**:
24
+ * Once the app loads, use the "Upload PDF Documents" button on the interface.
25
+ * Select one or more PDF files containing the Machine Learning theory content you want the chatbot to reference.
26
+ * The app will process these documents, extract text, embed it, and build an internal knowledge base.
27
+
28
+ 3. **Ask Questions**:
29
+ * After the documents are successfully processed (check the "Upload Status" textbox), type your questions related to the uploaded content into the chat interface.
30
+ * The chatbot will retrieve relevant information from your documents and use the Gemini model to formulate an answer.
31
+
32
+ ## Technical Details
33
+
34
+ * **Large Language Model (LLM)**: `models/gemini-2.0-flash` (provided by Google Gemini API)
35
+ * **Embedding Model**: `all-MiniLM-L6-v2` (from Sentence Transformers, for converting text into numerical vectors)
36
+ * **Vector Database**: FAISS (for efficient similarity search of document embeddings)
37
+ * **Framework**: Gradio (for the interactive web interface)
38
+ * **Document Processing**: PyMuPDF (for extracting text from PDF files)
39
 
40
  ## Dependencies
41
 
42
+ The core Python dependencies for this application are listed in `requirements.txt`:
43
+
 
44
  * `faiss-cpu`
45
  * `PyMuPDF`
46
+ * `google-generativeai`
47
+ * `sentence-transformers`
48
  * `numpy`
49
+ * `gradio`