xp3857 commited on
Commit
103e822
·
1 Parent(s): 74dac89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -1,9 +1,12 @@
1
  import gradio as gr
2
  import os
 
 
 
3
 
4
  model = gr.Interface.load(f"models/wavymulder/portraitplus")
5
- o = os.getenv("P")
6
-
7
  def ac():
8
  def im_fn(put,fac="",h=None):
9
  if h == o:
@@ -14,7 +17,7 @@ def ac():
14
  return(None,None)
15
  def cl_fac():
16
  return ""
17
- with gr.Blocks() as b:
18
  with gr.Row():
19
  put = gr.Textbox()
20
  btn1 = gr.Button()
@@ -25,7 +28,7 @@ def ac():
25
  out3 = gr.Image()
26
  out4 = gr.Image()
27
  with gr.Row(visible=False):
28
- h=gr.Textbox(value="Q")
29
  fac_b = gr.Textbox(value="",visible=False)
30
  btn1.click(cl_fac,None,fac_b)
31
  btn1.click(im_fn,[put,fac_b,h],[out1,fac_b])
 
1
  import gradio as gr
2
  import os
3
+ import requests
4
+ r = requests.get(f'https://huggingface.co/spaces/xp3857/text-to-image/raw/main/css.css')
5
+ css = r.text
6
 
7
  model = gr.Interface.load(f"models/wavymulder/portraitplus")
8
+ #o = os.getenv("P")
9
+ o="V"
10
  def ac():
11
  def im_fn(put,fac="",h=None):
12
  if h == o:
 
17
  return(None,None)
18
  def cl_fac():
19
  return ""
20
+ with gr.Blocks(css=css) as b:
21
  with gr.Row():
22
  put = gr.Textbox()
23
  btn1 = gr.Button()
 
28
  out3 = gr.Image()
29
  out4 = gr.Image()
30
  with gr.Row(visible=False):
31
+ h=gr.Textbox(value="V")
32
  fac_b = gr.Textbox(value="",visible=False)
33
  btn1.click(cl_fac,None,fac_b)
34
  btn1.click(im_fn,[put,fac_b,h],[out1,fac_b])