zakihassan04 commited on
Commit
06d5467
·
verified ·
1 Parent(s): 0249e3b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -9
README.md CHANGED
@@ -1,11 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- title: Tacab Ai
3
- emoji: 😻
4
- colorFrom: blue
5
- colorTo: blue
6
- sdk: docker
7
- pinned: false
8
- license: mit
9
- ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🌾 Tacab Somali QA Chatbot API
2
+
3
+ This FastAPI app serves as a Somali-language Question Answering (QA) system trained on agricultural data.
4
+
5
+ ## 🚀 Features
6
+
7
+ - Supports **exact match** and **semantic search** using multilingual sentence embeddings.
8
+ - Powered by fine-tuned GPT-2 model: `zakihassan04/gpt2-finetuned-somali`.
9
+ - API endpoint for mobile/web app integration.
10
+
11
+ ## 🧪 How to Run
12
+
13
+ ### With Docker:
14
+ ```bash
15
+ docker build -t tacab-chat .
16
+ docker run -p 8000:8000 tacab-chat
17
+
18
+
19
  ---
 
 
 
 
 
 
 
 
20
 
21
+ ### `app.py` (or `app/main.py`)
22
+
23
+ If you're placing all in one file:
24
+
25
+ ```python
26
+ # app.py
27
+ from fastapi import FastAPI, Request
28
+ from pydantic import BaseModel
29
+
30
+ app = FastAPI()
31
+
32
+ class Question(BaseModel):
33
+ question: str
34
+
35
+ @app.post("/answer")
36
+ def get_answer(q: Question):
37
+ # Placeholder logic
38
+ return {"answer": f"Jawaabta su’aashaada '{q.question}' waa ..."}