Spaces:
Sleeping
Sleeping
Commit
·
394f37d
1
Parent(s):
5d264d1
Update gradio_app.py
Browse files- gradio_app.py +2 -2
gradio_app.py
CHANGED
|
@@ -17,7 +17,7 @@ print("! SETTING MODEL IN EVALUATION MODE !")
|
|
| 17 |
translator_model.eval()
|
| 18 |
print("! INITING LLAMA MODEL !")
|
| 19 |
llm = Llama(model_path="./model.bin") # LLaMa model
|
| 20 |
-
llama_model_name = "TheBloke/
|
| 21 |
print("! INITING DONE !")
|
| 22 |
|
| 23 |
# Preparing things to work
|
|
@@ -52,7 +52,7 @@ def generate_answer(request: str, max_tokens: int = 256, language: str = "en", c
|
|
| 52 |
return "Not enough data! Check that you passed all needed data."
|
| 53 |
|
| 54 |
try:
|
| 55 |
-
output = llm(userPrompt, max_tokens=maxTokens, stop=["User:"
|
| 56 |
text = output["choices"][0]["text"]
|
| 57 |
# i allowed only certain languages (its not discrimination, its just other popular language on my opinion!!!):
|
| 58 |
# russian (ru), ukranian (uk), chinese (zh)
|
|
|
|
| 17 |
translator_model.eval()
|
| 18 |
print("! INITING LLAMA MODEL !")
|
| 19 |
llm = Llama(model_path="./model.bin") # LLaMa model
|
| 20 |
+
llama_model_name = "TheBloke/WizardLM-1.0-Uncensored-Llama2-13B-GGUF"
|
| 21 |
print("! INITING DONE !")
|
| 22 |
|
| 23 |
# Preparing things to work
|
|
|
|
| 52 |
return "Not enough data! Check that you passed all needed data."
|
| 53 |
|
| 54 |
try:
|
| 55 |
+
output = llm(userPrompt, max_tokens=maxTokens, stop=["User:"], echo=False)
|
| 56 |
text = output["choices"][0]["text"]
|
| 57 |
# i allowed only certain languages (its not discrimination, its just other popular language on my opinion!!!):
|
| 58 |
# russian (ru), ukranian (uk), chinese (zh)
|