Spaces:
Running
Running
Added Option to add Openrouter keys
Browse files
app.py
CHANGED
@@ -92,7 +92,7 @@ class MarketUseCaseGen:
|
|
92 |
# Input fields for API keys
|
93 |
serper_api_key = st.text_input("Serper API Key", type="password")
|
94 |
gemini_api_key = st.text_input("Gemini Flash API Key", type="password")
|
95 |
-
|
96 |
# Button to save API keys
|
97 |
if st.button("Save API Keys"):
|
98 |
# Check if both API keys are provided
|
@@ -100,6 +100,7 @@ class MarketUseCaseGen:
|
|
100 |
# Set environment variables for API keys
|
101 |
os.environ['SERPER_API_KEY'] = serper_api_key # Installed the SERPER_API_KEY in the environment
|
102 |
os.environ['GOOGLE_API_KEY'] = gemini_api_key # Installed the gemini_api_key in the environment
|
|
|
103 |
st.success("API keys saved successfully!")
|
104 |
else:
|
105 |
st.error("Please enter both API keys.")
|
|
|
92 |
# Input fields for API keys
|
93 |
serper_api_key = st.text_input("Serper API Key", type="password")
|
94 |
gemini_api_key = st.text_input("Gemini Flash API Key", type="password")
|
95 |
+
openrouter_api_key = st.text_input("Open Router API Key", type="password")
|
96 |
# Button to save API keys
|
97 |
if st.button("Save API Keys"):
|
98 |
# Check if both API keys are provided
|
|
|
100 |
# Set environment variables for API keys
|
101 |
os.environ['SERPER_API_KEY'] = serper_api_key # Installed the SERPER_API_KEY in the environment
|
102 |
os.environ['GOOGLE_API_KEY'] = gemini_api_key # Installed the gemini_api_key in the environment
|
103 |
+
os.environ['OPENROUTER_API_KEY'] = openrouter_api_key
|
104 |
st.success("API keys saved successfully!")
|
105 |
else:
|
106 |
st.error("Please enter both API keys.")
|