Waseem7711 commited on
Commit
e53dcd4
·
verified ·
1 Parent(s): ed85eec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -13
app.py CHANGED
@@ -1,21 +1,12 @@
1
- import os
2
  import pdfplumber
3
  import streamlit as st
4
  from groq import Groq
5
 
6
- import os
7
- import streamlit as st
8
-
9
- st.write("Environment Variables:")
10
- st.write(dict(os.environ))
11
-
12
- # Fetch the Groq API key from environment variables
13
- api_key = os.environ.get("GROQ_API_KEY")
14
- if not api_key:
15
- raise ValueError("The GROQ_API_KEY environment variable is not set.")
16
 
17
- # Initialize the Groq client
18
- client = Groq(api_key=api_key)
19
 
20
  # Function to extract text from the PDF
21
  def extract_text_from_pdf(pdf_path):
 
 
1
  import pdfplumber
2
  import streamlit as st
3
  from groq import Groq
4
 
5
+ # Replace with your actual API key
6
+ API_KEY = "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"
 
 
 
 
 
 
 
 
7
 
8
+ # Initialize the Groq client with the API key
9
+ client = Groq(api_key=API_KEY)
10
 
11
  # Function to extract text from the PDF
12
  def extract_text_from_pdf(pdf_path):