Spaces:
Build error
Build error
Credits Down
Browse files- .gitignore +1 -1
- app.py +2 -2
- testloadenv.py +12 -0
.gitignore
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
/venv/
|
| 2 |
-
|
| 3 |
source.jpg
|
| 4 |
source.png
|
| 5 |
target.jpg
|
|
|
|
| 1 |
/venv/
|
| 2 |
+
.env
|
| 3 |
source.jpg
|
| 4 |
source.png
|
| 5 |
target.jpg
|
app.py
CHANGED
|
@@ -113,7 +113,7 @@ destination_image = gr.Image(label="Destination")
|
|
| 113 |
|
| 114 |
#Outputs
|
| 115 |
result_image = gr.Image(label="Blend Result")
|
| 116 |
-
|
| 117 |
lbl_console = gr.Label(label="AI Terminal Messages", value="AI Engine ready...", container=True)
|
| 118 |
btn_buy = gr.Button("Buy More", visible=True, size='lg')
|
| 119 |
#btn_buy.click(fn=click_buy, outputs=mrk_title)
|
|
@@ -146,7 +146,7 @@ with gr.Blocks(theme=gr.themes.Base(), css="footer {visibility: hidden}") as mai
|
|
| 146 |
fn=perform,
|
| 147 |
title="",
|
| 148 |
inputs=[source_image, destination_image],
|
| 149 |
-
outputs=[result_image, lbl_console, btn_buy],
|
| 150 |
)
|
| 151 |
|
| 152 |
main.launch(auth=authenticate)
|
|
|
|
| 113 |
|
| 114 |
#Outputs
|
| 115 |
result_image = gr.Image(label="Blend Result")
|
| 116 |
+
txt_credits = gr.Textbox(label="Credits Available", value="205", interactive=False)
|
| 117 |
lbl_console = gr.Label(label="AI Terminal Messages", value="AI Engine ready...", container=True)
|
| 118 |
btn_buy = gr.Button("Buy More", visible=True, size='lg')
|
| 119 |
#btn_buy.click(fn=click_buy, outputs=mrk_title)
|
|
|
|
| 146 |
fn=perform,
|
| 147 |
title="",
|
| 148 |
inputs=[source_image, destination_image],
|
| 149 |
+
outputs=[result_image, lbl_console, txt_credits, btn_buy],
|
| 150 |
)
|
| 151 |
|
| 152 |
main.launch(auth=authenticate)
|
testloadenv.py
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from dotenv import load_dotenv
|
| 3 |
+
|
| 4 |
+
# Carga las variables del archivo .env
|
| 5 |
+
load_dotenv()
|
| 6 |
+
|
| 7 |
+
# Accede a las variables como si fueran variables de entorno normales
|
| 8 |
+
API_KEY = os.getenv('MI_VARIABLE')
|
| 9 |
+
DATABASE_URL = os.getenv('OTRA_VARIABLE')
|
| 10 |
+
|
| 11 |
+
print(API_KEY)
|
| 12 |
+
print(DATABASE_URL)
|