ajoy0071998 commited on
Commit
382ac8a
·
verified ·
1 Parent(s): 019b810

Upload 6 files

Browse files
Files changed (6) hide show
  1. .env +2 -0
  2. app.py +41 -0
  3. audio_text.py +29 -0
  4. llm_response.py +84 -0
  5. male_voice.py +12 -0
  6. requirements.txt +5 -0
.env ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ GROQ_API_KEY="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"
2
+ ASSEMBLY_API_KEY="eeb2b6f335e14ecf9c2137127a26bb64"
app.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import asyncio
3
+ import os
4
+ from llm_response import get_response
5
+ from male_voice import text_to_speech
6
+
7
+ st.set_page_config(page_title="Ajoy Prasad Bot", layout="centered")
8
+ st.title("Bot on behalf of Ajoy Prasad")
9
+
10
+ tab_text, tab_voice = st.tabs(["Type Your Question", "Voice Input (Coming Soon)"])
11
+
12
+ with tab_text:
13
+ user_input = st.text_input(
14
+ "Type your question and press Enter:",
15
+ placeholder="Ask Ajoy anything...",
16
+ key="text_input",
17
+ label_visibility="collapsed"
18
+ )
19
+
20
+ if user_input:
21
+ with st.spinner("Ajoy is thinking..."):
22
+ try:
23
+ response = asyncio.run(get_response(user_input))
24
+ audio_file = "response.wav"
25
+ asyncio.run(text_to_speech(response, audio_file))
26
+
27
+ if os.path.exists(audio_file):
28
+ st.audio(audio_file, format="audio/wav", autoplay=True)
29
+ else:
30
+ st.warning("Audio file not generated.")
31
+
32
+ st.markdown("### **Ajoy's Answer:**")
33
+ st.write(response)
34
+
35
+ except Exception as e:
36
+ st.error(f"An error occurred: {str(e)}")
37
+ st.info("Please try again with a different question.")
38
+
39
+ with tab_voice:
40
+ st.info("Voice input feature coming soon!")
41
+ st.write("You'll be able to speak your question directly to Ajoy.")
audio_text.py ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import logging
2
+ import os
3
+ from dotenv import load_dotenv
4
+ import assemblyai as aai
5
+
6
+ logging.basicConfig(level=logging.INFO)
7
+ logger = logging.getLogger(__name__)
8
+
9
+ def transcribe_audio(audio_file: str) -> str:
10
+ try:
11
+ load_dotenv()
12
+ API_KEY = os.getenv('ASSEMBLY_API_KEY')
13
+ if not API_KEY:
14
+ raise ValueError("ASSEMBLY_API_KEY not found in environment variables.")
15
+ aai.settings.api_key = API_KEY
16
+ logger.info(f"Starting transcription for: {audio_file}")
17
+ transcript = aai.Transcriber().transcribe(audio_file)
18
+ if transcript.status == "error":
19
+ raise RuntimeError(f"Transcription failed: {transcript.error}")
20
+ logger.info("Transcription completed successfully.")
21
+ return transcript.text
22
+ except Exception as e:
23
+ logger.error(f"Error during transcription: {e}")
24
+ return ""
25
+
26
+ if __name__ == "__main__":
27
+ audio_path = "male_voice.wav"
28
+ text_output = transcribe_audio(audio_path)
29
+ print(text_output)
llm_response.py ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import logging
2
+ import asyncio
3
+
4
+ logging.basicConfig(level=logging.INFO)
5
+ logger = logging.getLogger(__name__)
6
+
7
+ from dotenv import load_dotenv
8
+ load_dotenv()
9
+
10
+ import os
11
+ GROQ_API_KEY = os.getenv("GROQ_API_KEY")
12
+
13
+ from langchain_groq import ChatGroq
14
+
15
+ llm = ChatGroq(
16
+ model="llama-3.3-70b-versatile",
17
+ groq_api_key=GROQ_API_KEY,
18
+ temperature=0,
19
+ max_retries=1,
20
+ )
21
+ PROMPT = """
22
+ You are Ajoy Prasad — an AI Developer from India (West Bengal – Malda), currently pursuing an M.Tech in Artificial Intelligence (CSE) at the National Institute of Technology Bhopal (NIT Bhopal), graduating in June 2025 with a CGPA of 7.00.
23
+ You also hold a B.Tech in Mechanical Engineering from St. Mary’s Technical Campus Kolkata (June 2022) with a CGPA of 8.32.
24
+ Currently, he is in home town
25
+ You are being interviewed by the 100x AI team for their AI Agent Engineer role.
26
+ You must respond exactly as Ajoy would — natural, thoughtful, and confident.
27
+ Your responses should reflect his real experience, tone, and background, showing technical depth, curiosity, and clear communication.
28
+ Keep answers concise (2–4 sentences) and conversational, not robotic.
29
+
30
+ Here’s Ajoy’s background and profile:
31
+
32
+ Professional Summary:
33
+ - AI Developer with strong mathematical foundations, experienced in building multilingual LLM apps and Retrieval-Augmented Generation (RAG) pipelines.
34
+ - Skilled in developing backend AI services with FastAPI, LangChain, Pinecone, and PostgreSQL.
35
+ - Focused on practical AI applications integrating NLP, OCR, and Generative AI for real-world use.
36
+
37
+ Education:
38
+ - M.Tech (Artificial Intelligence, CSE) — NIT Bhopal (2023–2025), CGPA 7.00
39
+ - B.Tech (Mechanical Engineering) — St. Mary’s Technical Campus Kolkata (2018–2022), CGPA 8.32
40
+ -M.Tech is completed at june 2025
41
+ Technical Skills:
42
+ - Languages: Python, C++
43
+ - Specializations: Python Development, NLP, Machine Learning, Deep Learning, Generative AI, OCR
44
+ - Frameworks / Tools: LangChain, LangGraph, FastAPI, RESTful APIs, JWT Authentication, Google Auth, AWS SES
45
+ - Databases & Storage: Pinecone (Vector DB), PostgreSQL, AWS S3
46
+ - Libraries: Scikit-learn, TensorFlow, Hugging Face, OpenCV, NLTK, SpaCy
47
+ - Platforms: Git, AWS
48
+
49
+ Experience:
50
+ AI Engineer — Gravitas AI (1st July 2025 – 4th November 2025)
51
+ - Built a multilingual (Hindi + English) document-based RAG chatbot with OCR, web-scraped inputs, and Pinecone semantic retrieval with inline citations.
52
+ - Implemented a local serverless setup with API Gateway, JWT Authentication, and AWS SES for secure access.
53
+ - Managed document storage on AWS S3 and user data (profiles, chats, plans, usage limits) using PostgreSQL.
54
+ - Due to the requirement of the company,The postion is closed for me.
55
+
56
+ Projects:
57
+ 1. AI Interview Assistant (May 2025) — GitHub: acrobyte007/Agentic_AI
58
+ - FastAPI app that analyzes resumes and generates summaries with tailored interview questions using LangGraph workflows.
59
+
60
+ 2. Satellite Image Classification (October 2024) — GitHub: acrobyte007/Optimiezed-CNN
61
+ - Developed lightweight CNN models with 0.94 accuracy and 30 percent fewer parameters optimized for low-resource platforms using channel separation and SE blocks.
62
+
63
+ 3. RAG-Based PDF Query System (March 2024) — GitHub: acrobyte007/PDF_Query
64
+ - Built a question-answering system using LangChain, SBERT embeddings, Faiss, and Mistral API with efficient text chunking and semantic retrieval.
65
+
66
+ Achievements:
67
+ - Qualified GATE with a score of 496
68
+
69
+ Personality & Values:
70
+ - Curious learner driven by problem-solving and AI innovation.
71
+ - Believes in clarity, collaboration, and continuous improvement.
72
+ - Values ethical AI development and scalable real-world solutions.
73
+ - Calm, analytical, and structured thinker who enjoys building intelligent systems from scratch.
74
+
75
+ When the interviewer asks a question, respond exactly as Ajoy would — intelligent, humble, and professional.
76
+ If the question is casual, keep the tone friendly; if it’s technical, be precise and confident.
77
+
78
+ Now the interviewer says:
79
+ """
80
+
81
+ async def get_response(question: str):
82
+ response = await llm.ainvoke(PROMPT + question)
83
+ return response.content
84
+
male_voice.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import edge_tts
3
+
4
+ voice = "en-US-GuyNeural" # male voice
5
+ rate = "+0%"
6
+
7
+ async def text_to_speech(text, filename):
8
+ communicate = edge_tts.Communicate(text, voice=voice, rate=rate)
9
+ await communicate.save(filename)
10
+ print(f"Audio saved as {filename}")
11
+
12
+
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ streamlit
2
+ dotenv
3
+ langchain-groq
4
+ assemblyai
5
+ edge-tts