We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4d04c0 commit aadaa94Copy full SHA for aadaa94
webui.py
@@ -1,8 +1,8 @@
1
import os
2
import subprocess
3
-from typing import Optional
4
5
import streamlit as st
+from dotenv import load_dotenv
6
7
from fuzzy.enums import EnvironmentVariables
8
from fuzzy.handlers.attacks.base import attack_handler_fm
@@ -13,6 +13,8 @@
13
from fuzzy.llm.providers.enums import LLMProvider
14
from utils import get_ollama_models
15
16
+load_dotenv()
17
+
18
st.set_page_config(
19
page_title="FuzzyAI Web UI",
20
layout="wide",
@@ -48,6 +50,10 @@
48
50
if new_env_key and new_env_value:
49
51
st.session_state.env_vars[new_env_key] = new_env_value
52
53
+for x in EnvironmentVariables:
54
+ if x.value in os.environ:
55
+ st.session_state.env_vars[x.value] = os.environ[x.value]
56
57
# Create a container for the table
58
with st.sidebar.container():
59
if st.session_state.env_vars:
0 commit comments