alok94 commited on
Commit
4baf6f4
1 Parent(s): 167d81f

made chainges in environ

Browse files
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import streamlit as st
 
2
  from src.page1 import page1
3
  from src.page2 import page2
4
  from src.page3 import page3
@@ -11,6 +12,8 @@ from src.page8 import page8
11
  import os
12
  from dotenv import load_dotenv
13
  load_dotenv()
 
 
14
  st.set_page_config(layout="wide")
15
 
16
 
 
1
  import streamlit as st
2
+ import replicate
3
  from src.page1 import page1
4
  from src.page2 import page2
5
  from src.page3 import page3
 
12
  import os
13
  from dotenv import load_dotenv
14
  load_dotenv()
15
+ REPLICATE_API_TOKEN = os.environ.get("REPLICATE_API_TOKEN")
16
+ replicate = replicate.Client(api_token=REPLICATE_API_TOKEN)
17
  st.set_page_config(layout="wide")
18
 
19
 
src/.env DELETED
@@ -1,2 +0,0 @@
1
- OPENAI_API_KEY="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"
2
- REPLICATE_API_TOKEN='r8_4fktoXrDGkgHY8uw1XlVtQJKQlAILKv0iBmPI'
 
 
 
src/__pycache__/page1.cpython-311.pyc ADDED
Binary file (2.04 kB). View file
 
src/__pycache__/page2.cpython-311.pyc ADDED
Binary file (1.73 kB). View file
 
src/__pycache__/page3.cpython-311.pyc ADDED
Binary file (1.86 kB). View file
 
src/__pycache__/page4.cpython-311.pyc ADDED
Binary file (2.4 kB). View file
 
src/__pycache__/page5.cpython-311.pyc ADDED
Binary file (4.61 kB). View file
 
src/__pycache__/page6.cpython-311.pyc ADDED
Binary file (4.16 kB). View file
 
src/__pycache__/page7.cpython-311.pyc ADDED
Binary file (4.59 kB). View file
 
src/__pycache__/page8.cpython-311.pyc ADDED
Binary file (4.76 kB). View file
 
src/__pycache__/utils.cpython-311.pyc ADDED
Binary file (2.08 kB). View file
 
src/page5.py CHANGED
@@ -1,9 +1,12 @@
1
  import streamlit as st
2
  # import openai
3
  from streamlit_extras.stylable_container import stylable_container
4
-
5
  import replicate
6
-
 
 
 
7
  streamlit_style = """
8
  <style>
9
  #MainMenu {visibility: hidden;}
@@ -98,18 +101,6 @@ def page5():
98
  col1,col2=placeholder.columns(2)
99
  for index, output in enumerate(outputs):
100
  if index%2==0:
101
- col1.image(output)
102
  else:
103
- col2.image(output)
104
-
105
- # response = openai.Image.create(
106
- # prompt = prompt,
107
- # n = num_images,
108
- # size=size,
109
- # )
110
-
111
- # for idx in range(num_images):
112
- # image_url = response["data"][idx]["url"]
113
-
114
- # st.image(image_url, caption=f"Generated image: {idx+1}",
115
- # use_column_width=True)
 
1
  import streamlit as st
2
  # import openai
3
  from streamlit_extras.stylable_container import stylable_container
4
+ from dotenv import load_dotenv
5
  import replicate
6
+ import os
7
+ load_dotenv()
8
+ REPLICATE_API_TOKEN = os.environ.get("REPLICATE_API_TOKEN")
9
+ replicate = replicate.Client(api_token=REPLICATE_API_TOKEN)
10
  streamlit_style = """
11
  <style>
12
  #MainMenu {visibility: hidden;}
 
101
  col1,col2=placeholder.columns(2)
102
  for index, output in enumerate(outputs):
103
  if index%2==0:
104
+ col1.image(output,caption=prompt)
105
  else:
106
+ col2.image(output,caption=prompt)
 
 
 
 
 
 
 
 
 
 
 
 
src/page6.py CHANGED
@@ -5,10 +5,9 @@ import os
5
  from dotenv import load_dotenv
6
  from streamlit_extras.stylable_container import stylable_container
7
  import streamlit_extras
8
- # load_dotenv()
9
- # REPLICATE_API_TOKEN = os.environ.get("REPLICATE_API_TOKEN")
10
- os.environ['REPLICATE_API_TOKEN'] = 'r8_4fktoXrDGkgHY8uw1XlVtQJKQlAILKv0iBmPI'
11
- replicate = replicate.Client(api_token='r8_4fktoXrDGkgHY8uw1XlVtQJKQlAILKv0iBmPI')
12
 
13
  streamlit_style = """
14
  <style>
 
5
  from dotenv import load_dotenv
6
  from streamlit_extras.stylable_container import stylable_container
7
  import streamlit_extras
8
+ load_dotenv()
9
+ REPLICATE_API_TOKEN = os.environ.get("REPLICATE_API_TOKEN")
10
+ replicate = replicate.Client(api_token=REPLICATE_API_TOKEN)
 
11
 
12
  streamlit_style = """
13
  <style>
src/page7.py CHANGED
@@ -5,10 +5,9 @@ import os
5
  from dotenv import load_dotenv
6
  from streamlit_extras.stylable_container import stylable_container
7
  import streamlit_extras
8
- # load_dotenv()
9
- # REPLICATE_API_TOKEN = os.environ.get("REPLICATE_API_TOKEN")
10
- os.environ['REPLICATE_API_TOKEN'] = 'r8_4fktoXrDGkgHY8uw1XlVtQJKQlAILKv0iBmPI'
11
- replicate = replicate.Client(api_token='r8_4fktoXrDGkgHY8uw1XlVtQJKQlAILKv0iBmPI')
12
 
13
  streamlit_style = """
14
  <style>
 
5
  from dotenv import load_dotenv
6
  from streamlit_extras.stylable_container import stylable_container
7
  import streamlit_extras
8
+ load_dotenv()
9
+ REPLICATE_API_TOKEN = os.environ.get("REPLICATE_API_TOKEN")
10
+ replicate = replicate.Client(api_token=REPLICATE_API_TOKEN)
 
11
 
12
  streamlit_style = """
13
  <style>
src/page8.py CHANGED
@@ -7,8 +7,7 @@ from streamlit_extras.stylable_container import stylable_container
7
  import streamlit_extras
8
  # load_dotenv()
9
  # REPLICATE_API_TOKEN = os.environ.get("REPLICATE_API_TOKEN")
10
- os.environ['REPLICATE_API_TOKEN'] = 'r8_4fktoXrDGkgHY8uw1XlVtQJKQlAILKv0iBmPI'
11
- replicate = replicate.Client(api_token='r8_4fktoXrDGkgHY8uw1XlVtQJKQlAILKv0iBmPI')
12
 
13
  streamlit_style = """
14
  <style>
 
7
  import streamlit_extras
8
  # load_dotenv()
9
  # REPLICATE_API_TOKEN = os.environ.get("REPLICATE_API_TOKEN")
10
+ # replicate = replicate.Client(api_token=REPLICATE_API_TOKEN)
 
11
 
12
  streamlit_style = """
13
  <style>