SHAMIL SHAHBAZ AWAN commited on
Commit
f0c8885
·
verified ·
1 Parent(s): 25dec29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -3,9 +3,8 @@ import pandas as pd
3
  import matplotlib.pyplot as plt
4
  import seaborn as sns
5
  import os
6
- from groq import Groq
7
 
8
- # Check if openpyxl is installed
9
  try:
10
  import openpyxl
11
  except ImportError:
@@ -13,6 +12,13 @@ except ImportError:
13
  os.system('pip install openpyxl')
14
  st.success("openpyxl installed successfully. Please restart the app.")
15
 
 
 
 
 
 
 
 
16
  # Configure page
17
  st.set_page_config(page_title="Data Augmentation App", layout="wide")
18
  st.markdown(
 
3
  import matplotlib.pyplot as plt
4
  import seaborn as sns
5
  import os
 
6
 
7
+ # Try importing openpyxl, and install if not present
8
  try:
9
  import openpyxl
10
  except ImportError:
 
12
  os.system('pip install openpyxl')
13
  st.success("openpyxl installed successfully. Please restart the app.")
14
 
15
+ # Import the Groq SDK (after installing it)
16
+ try:
17
+ from groq import Groq
18
+ except ImportError:
19
+ st.error("The 'groq' library is required but not installed. Please ensure it's included in requirements.txt.")
20
+ raise
21
+
22
  # Configure page
23
  st.set_page_config(page_title="Data Augmentation App", layout="wide")
24
  st.markdown(