Mudassir939 commited on
Commit
93e64b0
·
verified ·
1 Parent(s): 3154e18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -13,8 +13,8 @@ load_dotenv()
13
  app = Flask(__name__)
14
 
15
  # Get API keys from environment variables
16
- ASSEMBLYAI_API_KEY = os.getenv("ASSEMBLYAI_API_KEY")
17
- GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
18
 
19
  # Set AssemblyAI API key
20
  aai.settings.api_key = ASSEMBLYAI_API_KEY
@@ -100,7 +100,7 @@ def generate_api():
100
  transcript = transcriber.transcribe(file_path)
101
 
102
  # Send transcription and instructions to Gemini model
103
- model = ChatGoogleGenerativeAI(model="gemini-1.5-flash")
104
  message = HumanMessage(content=f"{GEMINI_INSTRUCTIONS}\n\nCall Transcription: {transcript.text}")
105
  response = model.stream([message])
106
 
 
13
  app = Flask(__name__)
14
 
15
  # Get API keys from environment variables
16
+ ASSEMBLYAI_API_KEY = os.getenv("ASSEMBLYAI_API_KEY").strip()
17
+ GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY").strip()
18
 
19
  # Set AssemblyAI API key
20
  aai.settings.api_key = ASSEMBLYAI_API_KEY
 
100
  transcript = transcriber.transcribe(file_path)
101
 
102
  # Send transcription and instructions to Gemini model
103
+ model = ChatGoogleGenerativeAI(model="gemini-1.5-flash-002")
104
  message = HumanMessage(content=f"{GEMINI_INSTRUCTIONS}\n\nCall Transcription: {transcript.text}")
105
  response = model.stream([message])
106