Skip to content

Commit 766a115

Browse files
removing google api
1 parent acbda52 commit 766a115

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

main.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11

22
from pwnedpasswords import pwnedpasswords as pwned
33
from ollama import Client
4-
from google import genai
54
import streamlit as st
65
import zxcvbn as zac
76
import hashlib
@@ -14,11 +13,6 @@
1413
# API configuration for StrengthX-Dildo:V1
1514
OLLAMA_API_URL = os.getenv("OLLAMA_API_URL")
1615
client = Client(host=OLLAMA_API_URL)
17-
18-
19-
# Google API configuration if Ollama fails
20-
GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
21-
google_client = genai.Client(api_key=GOOGLE_API_KEY)
2216

2317

2418

@@ -413,17 +407,6 @@
413407
st.rerun()
414408

415409

416-
# Fallback to Google GenAI if Ollama fails
417-
except Exception as ollama_error:
418-
response= google_client.models.generate_content(
419-
model="gemini-2.0-flash",
420-
contents="Generate a strong password and display only the password, no explanations, no extra text, and nothing else under any circumstances, Dont regenerate any password everytime generate a unique one and always generate minimum length of 16."
421-
)
422-
# Store the password in session state
423-
st.session_state.generated_password = response.text
424-
st.session_state.ai_text = response.text
425-
st.rerun()
426-
427410
except:
428411
st.session_state.ai_text = "❌Failed to generate password."
429412
st.rerun()

0 commit comments

Comments
 (0)