Spaces:
Sleeping
Sleeping
Upload 8 files
Browse files- Readme.md +1 -1
- app.py +3 -3
- requirements.txt +9 -0
Readme.md
CHANGED
|
@@ -11,6 +11,6 @@ pinned: false
|
|
| 11 |
|
| 12 |
# ICT FAQ Solver
|
| 13 |
|
| 14 |
-
A fine-tuned FAQ answering bot powered by **
|
| 15 |
|
| 16 |
Ask any question and get an instant answer from the fine-tuned model.
|
|
|
|
| 11 |
|
| 12 |
# ICT FAQ Solver
|
| 13 |
|
| 14 |
+
A fine-tuned FAQ answering bot powered by **Phi-3-mini-4k + QLoRA** (`TechAvenger/MyFaqSolver`).
|
| 15 |
|
| 16 |
Ask any question and get an instant answer from the fine-tuned model.
|
app.py
CHANGED
|
@@ -7,7 +7,7 @@ from huggingface_hub import login
|
|
| 7 |
|
| 8 |
# ── Credentials from HF Secrets ───────────────────────────────────────────────
|
| 9 |
HF_TOKEN = os.environ.get("FAQ")
|
| 10 |
-
BASE_MODEL = os.environ.get("BASE_MODEL", "unsloth/
|
| 11 |
LORA_ADAPTER = os.environ.get("LORA_ADAPTER", "TechAvenger/MyFaqSolver")
|
| 12 |
|
| 13 |
MAX_NEW_TOKENS = 512
|
|
@@ -219,7 +219,7 @@ with gr.Blocks(css=css, title="FAQ Agent") as demo:
|
|
| 219 |
|
| 220 |
gr.HTML("""
|
| 221 |
<div id="header">
|
| 222 |
-
<div class="badge">
|
| 223 |
<h1>FAQ Answer Agent</h1>
|
| 224 |
<p>Ask any question — powered by your fine-tuned model</p>
|
| 225 |
</div>
|
|
@@ -237,7 +237,7 @@ with gr.Blocks(css=css, title="FAQ Agent") as demo:
|
|
| 237 |
ask_btn = gr.Button("Ask →", elem_id="btn-ask", scale=1, min_width=80)
|
| 238 |
clear_btn = gr.Button("Clear", elem_id="btn-clear", scale=1, min_width=70)
|
| 239 |
|
| 240 |
-
gr.HTML('<div id="footer">TechAvenger/MyFaqSolver ·
|
| 241 |
|
| 242 |
ask_btn.click(fn=answer_question, inputs=[question_input, chatbot], outputs=[chatbot, question_input])
|
| 243 |
question_input.submit(fn=answer_question, inputs=[question_input, chatbot], outputs=[chatbot, question_input])
|
|
|
|
| 7 |
|
| 8 |
# ── Credentials from HF Secrets ───────────────────────────────────────────────
|
| 9 |
HF_TOKEN = os.environ.get("FAQ")
|
| 10 |
+
BASE_MODEL = os.environ.get("BASE_MODEL", "unsloth/Phi-3-mini-4k-instruct-bnb-4bit")
|
| 11 |
LORA_ADAPTER = os.environ.get("LORA_ADAPTER", "TechAvenger/MyFaqSolver")
|
| 12 |
|
| 13 |
MAX_NEW_TOKENS = 512
|
|
|
|
| 219 |
|
| 220 |
gr.HTML("""
|
| 221 |
<div id="header">
|
| 222 |
+
<div class="badge">Phi-3-mini · QLoRA · FAQ Agent</div>
|
| 223 |
<h1>FAQ Answer Agent</h1>
|
| 224 |
<p>Ask any question — powered by your fine-tuned model</p>
|
| 225 |
</div>
|
|
|
|
| 237 |
ask_btn = gr.Button("Ask →", elem_id="btn-ask", scale=1, min_width=80)
|
| 238 |
clear_btn = gr.Button("Clear", elem_id="btn-clear", scale=1, min_width=70)
|
| 239 |
|
| 240 |
+
gr.HTML('<div id="footer">TechAvenger/MyFaqSolver · Phi-3-mini-4k base · LoRA fine-tuned FAQ dataset</div>')
|
| 241 |
|
| 242 |
ask_btn.click(fn=answer_question, inputs=[question_input, chatbot], outputs=[chatbot, question_input])
|
| 243 |
question_input.submit(fn=answer_question, inputs=[question_input, chatbot], outputs=[chatbot, question_input])
|
requirements.txt
CHANGED
|
@@ -1,4 +1,13 @@
|
|
| 1 |
spaces
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
gradio>=4.0.0
|
| 3 |
transformers>=4.40.0
|
| 4 |
peft>=0.10.0
|
|
|
|
| 1 |
spaces
|
| 2 |
+
gradio>=4.0.0
|
| 3 |
+
transformers>=4.40.0
|
| 4 |
+
peft>=0.10.0
|
| 5 |
+
torch>=2.1.0
|
| 6 |
+
bitsandbytes>=0.43.0
|
| 7 |
+
accelerate>=0.29.0
|
| 8 |
+
huggingface_hub>=0.22.0
|
| 9 |
+
sentencepiece
|
| 10 |
+
|
| 11 |
gradio>=4.0.0
|
| 12 |
transformers>=4.40.0
|
| 13 |
peft>=0.10.0
|