Spaces:
Sleeping
title: Social Profile Analyzer
emoji: π
colorFrom: pink
colorTo: red
sdk: docker
pinned: false
license: mit
short_description: 'AI tool: profile insights, summary, and conversation starter'
Social Profile Analyzer (Agentic AI Project)
This project is an intelligent Agentic AI web application built using LangChain and OpenRouterβs DeepSeek model. It takes a person's name as input and returns a professional profile summary, interesting facts, potential ice-breakers, and topics of interest based on publicly available data from LinkedIn and Twitter.
π Demo
Available on Hugging Face Spaces
π‘ Features
- π Name-based Profile Search (LinkedIn & Twitter)
- π Summarized Bio & Facts
- π¬ Conversation Starters & Ice-breakers
- π Topics of Interest
- π§ Powered by LangChain + DeepSeek: R1 0528 (free)
π¦ Tech Stack
- π¦ LangChain (Agents + Tools)
- π Flask (Frontend + Backend)
- π§ Deepseek R1 LLM
- πΈοΈ Tavily Search API
- π¦ Twitter API (via Tweepy)
- π Proxycurl (LinkedIn scraping)
- π§ͺ LangSmith (Optional for tracing/debugging)
π Environment Variables
To run this project locally or on Hugging Face, you must create a .env file in the root directory with the following keys:
OPENROUTER_API_KEY
PROXYCURL_API_KEY
TAVILY_API_KEY
TWITTER_API_KEY
TWITTER_API_KEY_SECRET
TWITTER_BEARER_TOKEN
TWITTER_ACCESS_TOKEN
TWITTER_ACCESS_TOKEN_SECRET
LANGCHAIN_TRACING # (Optional)
LANGSMITH_ENDPOINT # Required if tracing enabled
LANGCHAIN_API_KEY # Required if tracing enabled
LANGCHAIN_PROJECT # Required if tracing enabled
π€ LLM Configuration
This project uses the deepseek/deepseek-r1-0528:free model via OpenRouter for language generation.
If you want to use a different OpenRouter-compatible LLM, make sure to update the model parameter accordingly:
from langchain_openai import ChatOpenAI
import os
llm = ChatOpenAI(
model="deepseek/deepseek-r1-0528:free",
base_url="https://openrouter.ai/api/v1",
api_key=os.getenv("OPENROUTER_API_KEY"),
temperature=0,
)
π΅ Note on API Usage
This project uses paid API services:
- Proxycurl for LinkedIn data scraping
(Includes 10 free credits to start)- Twitter API (paid) for accessing Twitter data
π Behavior with Mock Data
Because these APIs are paid, the deployed version uses mock data.
π What does that mean?
- If you enter any name, the app will always return a hardcoded mock profile.
- This allows the demo to work without requiring paid API keys.
π§ How to Enable Real-time Data Scraping
To fetch real LinkedIn and Twitter data, follow these steps:
- Purchase API keys for Proxycurl and Twitter.
- Set the keys in your
.envfile. - Modify the file
profile_analyzer.py:
# π Replace this mock logic:
linkedin_data = scrape_linkedin_profile(linkedin_url, mock=True)
tweets = scrape_user_tweets_mock()
# β
With this:
linkedin_data = scrape_linkedin_profile(linkedin_url)
tweets = scrape_user_tweets(twitter_url)
π Contributing
Contributions are welcome! If you find a bug or have suggestions for improvements, feel free to open an issue or submit a pull request.
π¬ Contact
For any questions or feedback, reach out to me via LinkedIn or open an issue on this repository.
βοΈ Show Your Support
If you like this project, please give it a βοΈ on GitHub!