Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ GG_API_KEY = os.environ.get("GG_API_KEY")
|
|
12 |
oaiusr = os.environ.get("OAI_USR")
|
13 |
oaipwd = os.environ.get("OAI_PWD")
|
14 |
|
15 |
-
TITLE = """<h2 align="center"
|
16 |
|
17 |
AVATAR_IMAGES = ("./user.png", "./botg.png")
|
18 |
|
@@ -47,7 +47,6 @@ def user(text_prompt: str, chatbot: List[Tuple[str, str]]):
|
|
47 |
|
48 |
|
49 |
def bot(
|
50 |
-
google_key: str,
|
51 |
image_prompt: Optional[Image.Image],
|
52 |
temperature: float,
|
53 |
max_output_tokens: int,
|
@@ -56,10 +55,9 @@ def bot(
|
|
56 |
top_p: float,
|
57 |
chatbot: List[Tuple[str, str]]
|
58 |
):
|
59 |
-
|
60 |
-
|
61 |
text_prompt = chatbot[-1][0]
|
62 |
-
genai.configure(api_key=
|
63 |
generation_config = genai.types.GenerationConfig(
|
64 |
temperature=temperature,
|
65 |
max_output_tokens=max_output_tokens,
|
|
|
12 |
oaiusr = os.environ.get("OAI_USR")
|
13 |
oaipwd = os.environ.get("OAI_PWD")
|
14 |
|
15 |
+
TITLE = """<h2 align="center">✨Tomoniai's Gemini Pro Chat✨</h2>"""
|
16 |
|
17 |
AVATAR_IMAGES = ("./user.png", "./botg.png")
|
18 |
|
|
|
47 |
|
48 |
|
49 |
def bot(
|
|
|
50 |
image_prompt: Optional[Image.Image],
|
51 |
temperature: float,
|
52 |
max_output_tokens: int,
|
|
|
55 |
top_p: float,
|
56 |
chatbot: List[Tuple[str, str]]
|
57 |
):
|
58 |
+
|
|
|
59 |
text_prompt = chatbot[-1][0]
|
60 |
+
genai.configure(api_key=GG_API_KEY)
|
61 |
generation_config = genai.types.GenerationConfig(
|
62 |
temperature=temperature,
|
63 |
max_output_tokens=max_output_tokens,
|