Moibe commited on
Commit
9cdff9b
1 Parent(s): 81f2e47

Requires dotenv

Browse files
Files changed (2) hide show
  1. app.py +6 -3
  2. requirements.txt +2 -1
app.py CHANGED
@@ -127,7 +127,7 @@ btn_buy = gr.Button("Buy More", visible=True, size='lg')
127
  # — gr.themes.Soft()
128
 
129
  #valor = gr.State.tokens
130
- valor = ""
131
 
132
  with gr.Blocks(theme=gr.themes.Base(), css="footer {visibility: hidden}") as main:
133
 
@@ -135,8 +135,7 @@ with gr.Blocks(theme=gr.themes.Base(), css="footer {visibility: hidden}") as mai
135
  gr.Markdown(visible=True)
136
  gr.Markdown(visible=True)
137
  gr.Markdown(visible=True)
138
- #lbl_credits = gr.Label(label="Credits Available", value=valor, scale=1)
139
- lbl_credits = gr.Textbox(label="Credits Available", value="205", interactive=False)
140
  result_image.change(fn=display_tokens, outputs=lbl_credits)
141
 
142
  with gr.Row():
@@ -146,6 +145,10 @@ with gr.Blocks(theme=gr.themes.Base(), css="footer {visibility: hidden}") as mai
146
  title="",
147
  inputs=[source_image, destination_image],
148
  outputs=[result_image, lbl_console, txt_credits, btn_buy],
 
149
  )
 
 
 
150
 
151
  main.launch(auth=authenticate)
 
127
  # — gr.themes.Soft()
128
 
129
  #valor = gr.State.tokens
130
+ valor = "205"
131
 
132
  with gr.Blocks(theme=gr.themes.Base(), css="footer {visibility: hidden}") as main:
133
 
 
135
  gr.Markdown(visible=True)
136
  gr.Markdown(visible=True)
137
  gr.Markdown(visible=True)
138
+ lbl_credits = gr.Label(label="Credits Available", value=valor, scale=1)
 
139
  result_image.change(fn=display_tokens, outputs=lbl_credits)
140
 
141
  with gr.Row():
 
145
  title="",
146
  inputs=[source_image, destination_image],
147
  outputs=[result_image, lbl_console, txt_credits, btn_buy],
148
+ allow_flagging='auto'
149
  )
150
+
151
+ with gr.Row():
152
+ lbl_credits = gr.Textbox(label="Credits Available", value="205", interactive=False)
153
 
154
  main.launch(auth=authenticate)
requirements.txt CHANGED
@@ -13,4 +13,5 @@ tensorflow==2.13.0
13
  protobuf==4.23.4
14
  tqdm==4.65.0
15
  onnxruntime-gpu
16
- python-cryptography-fernet-wrapper
 
 
13
  protobuf==4.23.4
14
  tqdm==4.65.0
15
  onnxruntime-gpu
16
+ python-cryptography-fernet-wrapper
17
+ dotenv