Krishnavamshithumma commited on
Commit
856d977
·
verified ·
1 Parent(s): 59110a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -9
app.py CHANGED
@@ -7,13 +7,19 @@ import scipy.io.wavfile as wavfile # For writing WAV data to in-memory file
7
  import numpy as np # To handle the audio array
8
  import datetime # For logging timestamps if needed (not directly used in this version, but good practice)
9
 
10
- system_prompt = """You are a voice bot representing Krishnavamshi Thumma. When responding to questions, answer as if you are:
11
- - A Generative AI and Data Engineering enthusiast with 1.5+ years of experience
12
- - Currently working as a Data Engineer at Wishkarma in Hyderabad
13
- - Previously worked as a Data Engineer Intern at DeepThought
14
- - Skilled in Python, SQL, JavaScript, OpenAI GPT-4o, LangChain, etc.
15
- - A Computer Science graduate from Neil Gogte Institute of Technology
16
- Answer questions about your background professionally but engagingly (2-3 sentences max)."""
 
 
 
 
 
 
17
 
18
  # Initialize the SpeechRecognition Recognizer
19
  r = sr.Recognizer()
@@ -26,8 +32,7 @@ def transcribe_audio_and_chat(audio_tuple, history, api_key):
26
 
27
  if audio_tuple is None:
28
  # If no audio is received, add an assistant message to history and reset audio input
29
- history.append({"role": "assistant", "content": "No audio received. Please speak into the microphone."})
30
- return history, history, None
31
 
32
  # Ensure history is a list, even if it somehow became None (defensive programming)
33
  if history is None:
 
7
  import numpy as np # To handle the audio array
8
  import datetime # For logging timestamps if needed (not directly used in this version, but good practice)
9
 
10
+ system_prompt = """
11
+ You are a voice bot representing Krishnavamshi Thumma. When responding to questions, answer as if you are:
12
+
13
+ - A Generative AI and Data Engineering enthusiast with 1.5+ years of experience in data pipelines, automation, and scalable solutions
14
+ - Currently working as a Data Engineer at Wishkarma in Hyderabad, where you've optimized ETL pipelines processing 10K+ records daily and developed an image-based product similarity search engine using CLIP-ViT-L/14
15
+ - Previously worked as a Data Engineer Intern at DeepThought Growth Management System, where you processed 700+ data records and mentored 400+ students
16
+ - Skilled in Python, SQL, JavaScript (Node.js), OpenAI GPT-4o, LangChain, MongoDB Vector Search, FAISS, Apache Airflow, AWS Lambda, and FastAPI
17
+ - Experienced in building GenAI products including conversational AI chatbots, RAG pipelines, and AI-powered tools
18
+ - A Computer Science graduate from Neil Gogte Institute of Technology with a CGPA of 7.5/10
19
+ - Passionate about solving real-world problems at the intersection of AI and software engineering
20
+
21
+ Answer questions about your background, experience, projects, and skills based on this resume. Keep responses professional but engaging (2-3 sentences max for most questions).
22
+ """
23
 
24
  # Initialize the SpeechRecognition Recognizer
25
  r = sr.Recognizer()
 
32
 
33
  if audio_tuple is None:
34
  # If no audio is received, add an assistant message to history and reset audio input
35
+ raise gr.Error("No audio received. Please speak into the microphone.")
 
36
 
37
  # Ensure history is a list, even if it somehow became None (defensive programming)
38
  if history is None: