Rekham1110 commited on
Commit
245f291
·
verified ·
1 Parent(s): be882c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -0
app.py CHANGED
@@ -4,9 +4,35 @@ import os
4
  from PIL import Image
5
  import numpy as np
6
  from transformers import pipeline
 
 
 
 
 
 
7
  from simple_salesforce import Salesforce
8
  import io
9
  import time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  # Set up page title and layout
12
  st.title("Construction Project Progress Tracker")
 
4
  from PIL import Image
5
  import numpy as np
6
  from transformers import pipeline
7
+ from simple_salesforce import Salesforceimport streamlit as st
8
+ import requests
9
+ import os
10
+ from PIL import Image
11
+ import numpy as np
12
+ from transformers import pipeline
13
  from simple_salesforce import Salesforce
14
  import io
15
  import time
16
+ from dotenv import load_dotenv
17
+
18
+ # Load environment variables from .env file
19
+ load_dotenv()
20
+
21
+ # Set up page title and layout
22
+ st.title("Construction Project Progress Tracker")
23
+ st.write("Upload a photo of your construction site, and the AI will tell you the progress!")
24
+
25
+ # Salesforce connection using .env variables
26
+ sf = Salesforce(
27
+ username=os.getenv('SALESFORCE_USERNAME'),
28
+ password=os.getenv('SALESFORCE_PASSWORD'),
29
+ security_token=os.getenv('SALESFORCE_SECURITY_TOKEN'),
30
+ domain=os.getenv('SALESFORCE_DOMAIN')
31
+ )
32
+
33
+ # Rest of the app.py code remains the same...
34
+ import io
35
+ import time
36
 
37
  # Set up page title and layout
38
  st.title("Construction Project Progress Tracker")