web_duachatgpt.py is a Python script that powers an interactive AI assistant named @DuachatGPT, built with Gradio, LangChain, and OpenAI's GPT API.
✅ Key Features:
Natural Language Understanding via GPT-3.5-turbo (or GPT-4 if upgraded)
LangChain Agent that chooses the right tool based on user input
Gradio Chat Interface for easy browser or mobile access
🛠️ Built-in Tools:
1. Calculator Tool:
Accepts math expressions like "12 + 5 * 3"
Returns the computed result
⚠️ Uses eval() (should be replaced with ast.literal_eval for safety)
2. Greeting Tool:
Responds with a friendly message when given a name
Example: "Greet John" → "Hello, John! Nice to meet you..."
🚀 How It Works:
The app uses LangChain’s initialize_agent with ZERO_SHOT_REACT_DESCRIPTION
Based on the user’s input, the agent decides which tool to call
Responses are displayed in a chat-style interface powered by Gradio
🌍 Mobile-Friendly:
Fully accessible via mobile browsers when deployed (e.g., Hugging F…