JohnAlexander23 commited on
Commit
ec0716b
1 Parent(s): 0880620

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -9
app.py CHANGED
@@ -1,13 +1,8 @@
1
  import streamlit as st
2
- import os
3
- from groq import Groq # Ensure Groq library supports this usage
4
- from dotenv import load_dotenv
5
 
6
- # Load environment variables from .env file
7
- load_dotenv()
8
-
9
- # Retrieve Groq API key from environment variables
10
- os.getenv("GROQ_API_KEY")
11
 
12
  # Define function to fetch response
13
  def fetch_response(user_input):
@@ -23,7 +18,7 @@ def fetch_response(user_input):
23
  return chat_completion.choices[0].message.content
24
 
25
  # Streamlit app
26
- st.title("Fastest AI Chatbot By DL")
27
  st.write("Ask a question and get a response.")
28
 
29
  # Text input for user's question
 
1
  import streamlit as st
2
+ from groq import Groq
 
 
3
 
4
+ # Define the API key here
5
+ GROQ_API_KEY = "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"
 
 
 
6
 
7
  # Define function to fetch response
8
  def fetch_response(user_input):
 
18
  return chat_completion.choices[0].message.content
19
 
20
  # Streamlit app
21
+ st.title("Fastest AI Chatbot By DL Titans")
22
  st.write("Ask a question and get a response.")
23
 
24
  # Text input for user's question