michaeltsegaye commited on
Commit
538aed1
Β·
verified Β·
1 Parent(s): 3c11277

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -0
README.md CHANGED
@@ -26,6 +26,47 @@ Type your question in the chat box β€” MIK TSE will respond instantly with brand
26
  - Gradio
27
  - Python
28
  - Hugging Face Spaces
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  ---
31
 
 
26
  - Gradio
27
  - Python
28
  - Hugging Face Spaces
29
+ - # TikTok Viral Mastery β€” Question-Answering Chatbot (Hugging Face Space)
30
+
31
+ A Gradio-based chatbot that answers user questions using your **TikTok Viral Mastery** course content as its knowledge base.
32
+ This repo contains:
33
+
34
+ - `app.py` β€” the Gradio app and retrieval + generation pipeline
35
+ - `knowledge/` β€” put your course files here (plain `.txt`, `.md`, or `.pdf` converted to text)
36
+ - `.gitattributes`
37
+
38
+ ---
39
+
40
+ ## Features
41
+ - Simple TF-IDF retrieval over course chunks.
42
+ - Optional LLM generation via Hugging Face Inference API for fluent answers.
43
+ - Works offline (returns top-k context excerpts) if you don't provide an API key.
44
+ - Upload course files via `/knowledge` (for local usage) or push to the repo.
45
+
46
+ ---
47
+
48
+ ## Quick start (recommended for Hugging Face Spaces)
49
+
50
+ 1. Create a new Space (Gradio) on Hugging Face.
51
+ 2. Add this repo's files.
52
+ 3. Add your course text files inside a `knowledge/` directory at the repo root (e.g. `knowledge/course.txt`, `knowledge/chapter1.md`).
53
+ 4. (Optional) In the Space settings, set secrets:
54
+ - `HF_TOKEN` β€” your Hugging Face API token (required for calling Inference API)
55
+ - `HF_MODEL` β€” model ID to use for generation (default `google/flan-t5-large` if not set)
56
+ 5. Run the Space. The app will index `knowledge/` on startup.
57
+
58
+ ---
59
+
60
+ ## Environment & Requirements
61
+
62
+ Install locally for testing:
63
+
64
+ ```bash
65
+ python -m venv venv
66
+ source venv/bin/activate
67
+ pip install -r requirements.txt
68
+ python app.py # runs a local Gradio server
69
+
70
 
71
  ---
72