Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
# version - ArcticMonkeys:30.07.24
|
2 |
-
|
3 |
# python core libraries
|
4 |
import re
|
5 |
import psutil
|
@@ -21,6 +19,7 @@ from utils.prompt_toggle import select_prompt, load_prompts
|
|
21 |
from utils.image_caption import ImageCaption
|
22 |
from utils.documentation import html_content
|
23 |
from utils.payment import html_doge_wallet
|
|
|
24 |
|
25 |
prompts = load_prompts()
|
26 |
chat = Conversation()
|
@@ -57,9 +56,9 @@ def switching(text):
|
|
57 |
elif re.search("pay the ghost", text.lower(), re.IGNORECASE):
|
58 |
components.html(html_doge_wallet, height=600, scrolling=False)
|
59 |
elif re.search("long live liberty.", text.lower(), re.IGNORECASE):
|
60 |
-
exctracted_statement = exctrator(text.lower(), phrase="long live liberty")
|
61 |
prompt = f"Evaluate how far the statement from libertarian ideology 1 to 10 and why?\n\n{exctracted_statement}"
|
62 |
-
result =
|
63 |
else:
|
64 |
prompt = select_prompt(input_text=text, prompts=prompts, keywords=keywords)
|
65 |
result = chat.chatting(prompt=prompt if prompt is not None else text, is_own_model=False)
|
|
|
|
|
|
|
1 |
# python core libraries
|
2 |
import re
|
3 |
import psutil
|
|
|
19 |
from utils.image_caption import ImageCaption
|
20 |
from utils.documentation import html_content
|
21 |
from utils.payment import html_doge_wallet
|
22 |
+
from utils.statement_evaluation_command import get_response
|
23 |
|
24 |
prompts = load_prompts()
|
25 |
chat = Conversation()
|
|
|
56 |
elif re.search("pay the ghost", text.lower(), re.IGNORECASE):
|
57 |
components.html(html_doge_wallet, height=600, scrolling=False)
|
58 |
elif re.search("long live liberty.", text.lower(), re.IGNORECASE):
|
59 |
+
exctracted_statement = exctrator(text.lower(), phrase="long live liberty.")
|
60 |
prompt = f"Evaluate how far the statement from libertarian ideology 1 to 10 and why?\n\n{exctracted_statement}"
|
61 |
+
result = get_response(prompt)
|
62 |
else:
|
63 |
prompt = select_prompt(input_text=text, prompts=prompts, keywords=keywords)
|
64 |
result = chat.chatting(prompt=prompt if prompt is not None else text, is_own_model=False)
|