Spaces:
Runtime error
Runtime error
Commit
·
aaf0c9d
1
Parent(s):
9ccecfb
fix: bugfix
Browse files- backend/controller.py +3 -4
- main.py +0 -5
backend/controller.py
CHANGED
@@ -7,7 +7,6 @@ import gradio as gr
|
|
7 |
# internal imports
|
8 |
from model import godel
|
9 |
from model import mistral
|
10 |
-
from utils import modelling as mdl
|
11 |
from explanation import interpret_shap as shap_int, visualize as viz
|
12 |
|
13 |
|
@@ -103,9 +102,9 @@ def explained_chat(
|
|
103 |
model, xai, message: str, history: list, system_prompt: str, knowledge: str = ""
|
104 |
):
|
105 |
# formatting the prompt using the model's format_prompt function
|
106 |
-
message, history, system_prompt, knowledge = mdl.prompt_limiter(
|
107 |
-
|
108 |
-
)
|
109 |
prompt = model.format_prompt(message, history, system_prompt, knowledge)
|
110 |
|
111 |
# generating an answer using the methods chat function
|
|
|
7 |
# internal imports
|
8 |
from model import godel
|
9 |
from model import mistral
|
|
|
10 |
from explanation import interpret_shap as shap_int, visualize as viz
|
11 |
|
12 |
|
|
|
102 |
model, xai, message: str, history: list, system_prompt: str, knowledge: str = ""
|
103 |
):
|
104 |
# formatting the prompt using the model's format_prompt function
|
105 |
+
#message, history, system_prompt, knowledge = mdl.prompt_limiter(
|
106 |
+
# message, history, system_prompt, knowledge
|
107 |
+
#)
|
108 |
prompt = model.format_prompt(message, history, system_prompt, knowledge)
|
109 |
|
110 |
# generating an answer using the methods chat function
|
main.py
CHANGED
@@ -175,11 +175,6 @@ with gr.Blocks(
|
|
175 |
info="Add additional context knowledge.",
|
176 |
show_label=True,
|
177 |
)
|
178 |
-
# textbox to enter the user prompt
|
179 |
-
gr.Markdown(
|
180 |
-
"*Hint:* More complicated question give better explanation"
|
181 |
-
" insights!"
|
182 |
-
)
|
183 |
user_prompt = gr.Textbox(
|
184 |
label="Input Message",
|
185 |
max_lines=5,
|
|
|
175 |
info="Add additional context knowledge.",
|
176 |
show_label=True,
|
177 |
)
|
|
|
|
|
|
|
|
|
|
|
178 |
user_prompt = gr.Textbox(
|
179 |
label="Input Message",
|
180 |
max_lines=5,
|