Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ APP_TITLE = "π Asisten Kesehatan Feminacare"
|
|
| 19 |
INITIAL_MESSAGE = """Halo! π Saya adalah asisten kesehatan feminacare yang siap membantu Anda dengan informasi seputar kesehatan wanita.
|
| 20 |
Silakan ajukan pertanyaan apa saja dan saya akan membantu Anda dengan informasi yang akurat."""
|
| 21 |
|
| 22 |
-
MODEL_NAME = "SeaLLMs/SeaLLM-
|
| 23 |
EMBEDDING_MODEL = "sentence-transformers/all-MiniLM-L6-v2"
|
| 24 |
TOP_K_DOCS = 5
|
| 25 |
|
|
@@ -65,6 +65,7 @@ def create_llm():
|
|
| 65 |
# return HuggingFacePipeline(pipeline=text_generation_pipeline)
|
| 66 |
return HuggingFaceHub(
|
| 67 |
repo_id=MODEL_NAME,
|
|
|
|
| 68 |
model_kwargs={
|
| 69 |
"temperature": 0.7, # Balanced between creativity and accuracy
|
| 70 |
"max_new_tokens": 1024,
|
|
|
|
| 19 |
INITIAL_MESSAGE = """Halo! π Saya adalah asisten kesehatan feminacare yang siap membantu Anda dengan informasi seputar kesehatan wanita.
|
| 20 |
Silakan ajukan pertanyaan apa saja dan saya akan membantu Anda dengan informasi yang akurat."""
|
| 21 |
|
| 22 |
+
MODEL_NAME = "SeaLLMs/SeaLLM-13B-Chat"
|
| 23 |
EMBEDDING_MODEL = "sentence-transformers/all-MiniLM-L6-v2"
|
| 24 |
TOP_K_DOCS = 5
|
| 25 |
|
|
|
|
| 65 |
# return HuggingFacePipeline(pipeline=text_generation_pipeline)
|
| 66 |
return HuggingFaceHub(
|
| 67 |
repo_id=MODEL_NAME,
|
| 68 |
+
task="text-generation"
|
| 69 |
model_kwargs={
|
| 70 |
"temperature": 0.7, # Balanced between creativity and accuracy
|
| 71 |
"max_new_tokens": 1024,
|