{"id":24114587,"url":"https://github.com/AK391/ai-gradio","last_synced_at":"2025-09-18T02:33:55.821Z","repository":{"id":269351046,"uuid":"903259681","full_name":"AK391/ai-gradio","owner":"AK391","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-07T18:01:26.000Z","size":225,"stargazers_count":202,"open_issues_count":3,"forks_count":18,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-07T18:33:03.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AK391.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-14T06:02:33.000Z","updated_at":"2025-01-07T18:02:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"532a55c9-e711-4208-8ca8-2b3f0f08e448","html_url":"https://github.com/AK391/ai-gradio","commit_stats":null,"previous_names":["ak391/ai-gradio"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AK391%2Fai-gradio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AK391%2Fai-gradio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AK391%2Fai-gradio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AK391%2Fai-gradio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AK391","download_url":"https://codeload.github.com/AK391/ai-gradio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233441969,"owners_count":18676778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-11T05:01:47.624Z","updated_at":"2025-09-18T02:33:55.809Z","avatar_url":"https://github.com/AK391.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# ai-gradio\n\nA Python package that makes it easy for developers to create machine learning apps powered by various AI providers. Built on top of Gradio, it provides a unified interface for multiple AI models and services.\n\n## Features\n\n### Core Features\n- **Multi-Provider Support**: Integrate with 15+ AI providers including OpenAI, Google Gemini, Anthropic, and more\n- **Text Chat**: Interactive chat interfaces for all text models\n- **Voice Chat**: Real-time voice interactions with OpenAI models\n- **Video Chat**: Video processing capabilities with Gemini models\n- **Code Generation**: Specialized interfaces for coding assistance\n- **Multi-Modal**: Support for text, image, and video inputs\n- **Agent Teams**: CrewAI integration for collaborative AI tasks\n- **Browser Automation**: AI agents that can perform web-based tasks\n- **Computer-Use**: AI agents that can control a virtual local macOS/Linux environment\n\n### Model Support\n\n#### Core Language Models\n| Provider | Models |\n|----------|---------|\n| OpenAI | gpt-4-turbo, gpt-4, gpt-3.5-turbo |\n| Anthropic | claude-3-opus, claude-3-sonnet, claude-3-haiku |\n| Gemini | gemini-pro, gemini-pro-vision, gemini-2.0-flash-exp |\n| Groq | llama-3.2-70b-chat, mixtral-8x7b-chat |\n\n#### Specialized Models\n| Provider | Type | Models |\n|----------|------|---------|\n| LumaAI | Generation | dream-machine, photon-1 |\n| DeepSeek | Multi-purpose | deepseek-chat, deepseek-coder, deepseek-vision |\n| CrewAI | Agent Teams | Support Team, Article Team |\n| Qwen | Language | qwen-turbo, qwen-plus, qwen-max |\n| Browser | Automation | browser-use-agent |\n| Cua | Computer-Use | OpenAI Computer-Use Preview |\n\n## Installation\n\n### Basic Installation\n```bash\n# Install core package\npip install ai-gradio\n\n# Install with specific provider support\npip install 'ai-gradio[openai]'     # OpenAI support\npip install 'ai-gradio[gemini]'     # Google Gemini support\npip install 'ai-gradio[anthropic]'  # Anthropic Claude support\npip install 'ai-gradio[groq]'       # Groq support\n\n# Install all providers\npip install 'ai-gradio[all]'\n```\n\n### Additional Providers\n```bash\npip install 'ai-gradio[crewai]'     # CrewAI support\npip install 'ai-gradio[lumaai]'     # LumaAI support\npip install 'ai-gradio[xai]'        # XAI/Grok support\npip install 'ai-gradio[cohere]'     # Cohere support\npip install 'ai-gradio[sambanova]'  # SambaNova support\npip install 'ai-gradio[hyperbolic]' # Hyperbolic support\npip install 'ai-gradio[deepseek]'   # DeepSeek support\npip install 'ai-gradio[smolagents]' # SmolagentsAI support\npip install 'ai-gradio[fireworks]'  # Fireworks support\npip install 'ai-gradio[together]'   # Together support\npip install 'ai-gradio[qwen]'       # Qwen support\npip install 'ai-gradio[browser]'    # Browser support\npip install 'ai-gradio[cua]'        # Computer-Use support\n```\n\n## Usage\n\n### API Key Configuration\n```bash\n# Core Providers\nexport OPENAI_API_KEY=\u003cyour token\u003e\nexport GEMINI_API_KEY=\u003cyour token\u003e\nexport ANTHROPIC_API_KEY=\u003cyour token\u003e\nexport GROQ_API_KEY=\u003cyour token\u003e\nexport TAVILY_API_KEY=\u003cyour token\u003e  # Required for Langchain agents\n\n# Additional Providers (as needed)\nexport LUMAAI_API_KEY=\u003cyour token\u003e\nexport XAI_API_KEY=\u003cyour token\u003e\nexport COHERE_API_KEY=\u003cyour token\u003e\n# ... (other provider keys)\n\n# Twilio credentials (required for WebRTC voice chat)\nexport TWILIO_ACCOUNT_SID=\u003cyour Twilio account SID\u003e\nexport TWILIO_AUTH_TOKEN=\u003cyour Twilio auth token\u003e\n```\n\n### Quick Start\n```python\nimport gradio as gr\nimport ai_gradio\n\n# Create a simple chat interface\ngr.load(\n    name='openai:gpt-4-turbo',  # or 'gemini:gemini-1.5-flash', 'groq:llama-3.2-70b-chat'\n    src=ai_gradio.registry,\n    title='AI Chat',\n    description='Chat with an AI model'\n).launch()\n\n# Create a chat interface with Transformers models\ngr.load(\n    name='transformers:phi-4',  # or 'transformers:tulu-3', 'transformers:olmo-2-13b'\n    src=ai_gradio.registry,\n    title='Local AI Chat',\n    description='Chat with locally running models'\n).launch()\n\n# Create a coding assistant with OpenAI\ngr.load(\n    name='openai:gpt-4-turbo',\n    src=ai_gradio.registry,\n    coder=True,\n    title='OpenAI Code Assistant',\n    description='OpenAI Code Generator'\n).launch()\n\n# Create a coding assistant with Gemini\ngr.load(\n    name='gemini:gemini-2.0-flash-thinking-exp-1219',  # or 'openai:gpt-4-turbo', 'anthropic:claude-3-opus'\n    src=ai_gradio.registry,\n    coder=True,\n    title='Gemini Code Generator',\n).launch()\n```\n\n### Advanced Features\n\n#### Voice Chat\n```python\ngr.load(\n    name='openai:gpt-4-turbo',\n    src=ai_gradio.registry,\n    enable_voice=True,\n    title='AI Voice Assistant'\n).launch()\n```\n\n#### Camera Mode\n```python\n# Create a vision-enabled interface with camera support\ngr.load(\n    name='gemini:gemini-2.0-flash-exp',\n    src=ai_gradio.registry,\n    camera=True,\n).launch()\n```\n\n#### Multi-Provider Interface\n```python\nimport gradio as gr\nimport ai_gradio\n\nwith gr.Blocks() as demo:\n    with gr.Tab(\"Text\"):\n        gr.load('openai:gpt-4-turbo', src=ai_gradio.registry)\n    with gr.Tab(\"Vision\"):\n        gr.load('gemini:gemini-pro-vision', src=ai_gradio.registry)\n    with gr.Tab(\"Code\"):\n        gr.load('deepseek:deepseek-coder', src=ai_gradio.registry)\n\ndemo.launch()\n```\n\n#### CrewAI Teams\n```python\n# Article Creation Team\ngr.load(\n    name='crewai:gpt-4-turbo',\n    src=ai_gradio.registry,\n    crew_type='article',\n    title='AI Writing Team'\n).launch()\n```\n\n#### Browser Automation\n\n```bash\nplaywright install\n```\n\nuse python 3.11+ for browser use\n\n```python\nimport gradio as gr\nimport ai_gradio\n\n# Create a browser automation interface\ngr.load(\n    name='browser:gpt-4-turbo',\n    src=ai_gradio.registry,\n    title='AI Browser Assistant',\n    description='Let AI help with web tasks'\n).launch()\n```\n\nExample tasks:\n- Flight searches on Google Flights\n- Weather lookups\n- Product price comparisons\n- News searches\n\n#### Computer-Use Agent\n\n```bash\n# Install Computer-Use Agent support\npip install 'ai-gradio[cua]'\n\n# Install Lume daemon (macOS only)\nsudo /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/trycua/cua/main/libs/lume/scripts/install.sh)\"\n\n# Start the Lume daemon service (in a separate terminal)\nlume serve\n\n# Pull the pre-built macOS image\nlume pull macos-sequoia-cua:latest --no-cache\n```\n\nRequires macOS with Apple Silicon (M1/M2/M3/M4) and macOS 14 (Sonoma) or newer.\n\n```python\nimport gradio as gr\nimport ai_gradio\nfrom dotenv import load_dotenv\n\n# Load API keys from .env file\nload_dotenv()\n\n# Create a computer-use automation interface with OpenAI\ngr.load(\n    name='cua:gpt-4-turbo',  # Format: 'cua:model_name'\n    src=ai_gradio.registry,\n    title='Computer-Use Agent',\n    description='AI that can control a virtual macOS environment'\n).launch()\n```\n\nExample tasks:\n- Create Python virtual environments and run data analysis scripts\n- Open PDFs in Preview, add annotations, and save compressed versions\n- Browse Safari and manage bookmarks\n- Clone and build GitHub repositories\n- Configure SSH keys and remote connections\n- Create automation scripts and schedule them with cron\n\n#### Swarms Integration\n```python\nimport gradio as gr\nimport ai_gradio\n\n# Create a chat interface with Swarms\ngr.load(\n    name='swarms:gpt-4-turbo',  # or other OpenAI models\n    src=ai_gradio.registry,\n    agent_name=\"Stock-Analysis-Agent\",  # customize agent name\n    title='Swarms Chat',\n    description='Chat with an AI agent powered by Swarms'\n).launch()\n```\n\n#### Langchain Agents\n```python\nimport gradio as gr\nimport ai_gradio\n\n# Create a Langchain agent interface\ngr.load(\n    name='langchain:gpt-4-turbo',  # or other supported models\n    src=ai_gradio.registry,\n    title='Langchain Agent',\n    description='AI agent powered by Langchain'\n).launch()\n```\n\n## Requirements\n\n### Core Requirements\n- Python 3.10+\n- gradio \u003e= 5.9.1\n\n### Optional Features\n- Voice Chat: gradio-webrtc, numba==0.60.0, pydub, librosa\n- Video Chat: opencv-python, Pillow\n- Agent Teams: crewai\u003e=0.1.0, langchain\u003e=0.1.0\n\n## Troubleshooting\n\n### Authentication Issues\nIf you encounter 401 errors, verify your API keys:\n```python\nimport os\n\n# Set API keys manually if needed\nos.environ[\"OPENAI_API_KEY\"] = \"your-api-key\"\nos.environ[\"GEMINI_API_KEY\"] = \"your-api-key\"\n```\n\n### Provider Installation\nIf you see \"no providers installed\" errors:\n```bash\n# Install specific provider\npip install 'ai-gradio[provider_name]'\n\n# Or install all providers\npip install 'ai-gradio[all]'\n```\n\n\n## Contributing\nContributions are welcome! Please feel free to submit a Pull Request.\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAK391%2Fai-gradio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAK391%2Fai-gradio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAK391%2Fai-gradio/lists"}