mirror of
https://github.com/Shubhamsaboo/awesome-llm-apps.git
synced 2026-08-28 11:07:19 +08:00
- add gemini model option for LLM choice, use 'gemini-3.5-flash' by default.
- add uv support as package manager for the ai meme generator project.
This commit is contained in:
@@ -16,3 +16,6 @@ node_modules/
|
||||
.next/
|
||||
dist/
|
||||
*.tsbuildinfo
|
||||
|
||||
# JetBrains IDEs
|
||||
.idea/
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
3.11
|
||||
@@ -3,6 +3,7 @@ import streamlit as st
|
||||
from browser_use import Agent, SystemPrompt
|
||||
from langchain_openai import ChatOpenAI
|
||||
from langchain_anthropic import ChatAnthropic
|
||||
from langchain_google_genai import ChatGoogleGenerativeAI
|
||||
from langchain_core.messages import HumanMessage
|
||||
import re
|
||||
|
||||
@@ -20,6 +21,12 @@ async def generate_meme(query: str, model_choice: str, api_key: str) -> None:
|
||||
api_key=api_key,
|
||||
temperature=0.3
|
||||
)
|
||||
elif model_choice == "Gemini":
|
||||
llm = ChatGoogleGenerativeAI(
|
||||
model="gemini-3.5-flash",
|
||||
google_api_key=api_key,
|
||||
temperature=0)
|
||||
|
||||
else: # OpenAI
|
||||
llm = ChatOpenAI(
|
||||
model="gpt-4o",
|
||||
@@ -74,7 +81,7 @@ def main():
|
||||
# Model selection
|
||||
model_choice = st.selectbox(
|
||||
"Select AI Model",
|
||||
["Claude", "Deepseek", "OpenAI"],
|
||||
["Claude", "Deepseek", "OpenAI", "Gemini"],
|
||||
index=0,
|
||||
help="Choose which LLM to use for meme generation"
|
||||
)
|
||||
@@ -87,6 +94,9 @@ def main():
|
||||
elif model_choice == "Deepseek":
|
||||
api_key = st.text_input("Deepseek API Key", type="password",
|
||||
help="Get your API key from https://platform.deepseek.com")
|
||||
elif model_choice == "Gemini":
|
||||
api_key = st.text_input("Gemini API Key", type="password",
|
||||
help="Get your API key from https://aistudio.google.com/app/api-keys")
|
||||
else:
|
||||
api_key = st.text_input("OpenAI API Key", type="password",
|
||||
help="Get your API key from https://platform.openai.com")
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
[project]
|
||||
name = "ai-meme-generator-agent-browseruse"
|
||||
version = "0.1.0"
|
||||
requires-python = "==3.11.*"
|
||||
dependencies = [
|
||||
"streamlit",
|
||||
"browser-use==0.1.26",
|
||||
"playwright==1.49.1",
|
||||
"langchain-openai",
|
||||
"langchain-anthropic",
|
||||
"langchain-google-genai",
|
||||
]
|
||||
@@ -3,3 +3,4 @@ browser-use==0.1.26
|
||||
playwright==1.49.1
|
||||
langchain-openai
|
||||
langchain-anthropic
|
||||
langchain-google-genai
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user