Spaces:
Running
Running
Update src/insurance_assistants/ui.py
Browse files
src/insurance_assistants/ui.py
CHANGED
@@ -10,6 +10,7 @@ from gradio_pdf import PDF
|
|
10 |
from smolagents.gradio_ui import _process_action_step, _process_final_answer_step
|
11 |
from smolagents.memory import ActionStep, FinalAnswerStep, MemoryStep, PlanningStep
|
12 |
from smolagents.models import ChatMessageStreamDelta
|
|
|
13 |
|
14 |
# from smolagents import CodeAgent, InferenceClientModel
|
15 |
from src.insurance_assistants.agents import manager_agent
|
@@ -224,6 +225,7 @@ class UI:
|
|
224 |
with gr.Group():
|
225 |
api_key = gr.Textbox(placeholder="Enter your HuggingFace Inference API KEY HERE",
|
226 |
label="API key",show_label=True, type='password')
|
|
|
227 |
gr.Markdown(
|
228 |
value="**Your question, please...**", container=True
|
229 |
)
|
|
|
10 |
from smolagents.gradio_ui import _process_action_step, _process_final_answer_step
|
11 |
from smolagents.memory import ActionStep, FinalAnswerStep, MemoryStep, PlanningStep
|
12 |
from smolagents.models import ChatMessageStreamDelta
|
13 |
+
from huggingface_hub import login
|
14 |
|
15 |
# from smolagents import CodeAgent, InferenceClientModel
|
16 |
from src.insurance_assistants.agents import manager_agent
|
|
|
225 |
with gr.Group():
|
226 |
api_key = gr.Textbox(placeholder="Enter your HuggingFace Inference API KEY HERE",
|
227 |
label="API key",show_label=True, type='password')
|
228 |
+
login(token=api_key)
|
229 |
gr.Markdown(
|
230 |
value="**Your question, please...**", container=True
|
231 |
)
|