Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -131,19 +131,21 @@ def tot_prob():
|
|
131 |
|
132 |
with gr.Blocks() as app:
|
133 |
with gr.Column():
|
|
|
134 |
in_url=gr.Textbox(label="Image URL")
|
135 |
with gr.Row():
|
136 |
load_btn=gr.Button("Load URL")
|
137 |
btn = gr.Button("Detect AI")
|
138 |
mes = gr.HTML("""""")
|
139 |
-
inp = gr.Pil()
|
140 |
with gr.Group():
|
141 |
with gr.Row():
|
142 |
-
|
|
|
|
|
143 |
lab0 = gr.HTML(f"""<b>Testing on Model: <a href='https://huggingface.co/{models[0]}'>{models[0]}</a></b>""")
|
144 |
-
with gr.
|
145 |
lab1 = gr.HTML(f"""<b>Testing on Model: <a href='https://huggingface.co/{models[1]}'>{models[1]}</a></b>""")
|
146 |
-
with gr.
|
147 |
lab2 = gr.HTML(f"""<b>Testing on Model: <a href='https://huggingface.co/{models[2]}'>{models[2]}</a></b>""")
|
148 |
|
149 |
with gr.Row():
|
@@ -157,8 +159,7 @@ with gr.Blocks() as app:
|
|
157 |
n_out2=gr.Label(label="Output")
|
158 |
outp2 = gr.HTML("""""")
|
159 |
|
160 |
-
|
161 |
-
fin=gr.Label(label="Final Probability")
|
162 |
load_btn.click(load_url,in_url,[inp,mes])
|
163 |
btn.click(aiornot0,[inp],[outp0,n_out0]).then(tot_prob,None,fin)
|
164 |
btn.click(aiornot1,[inp],[outp1,n_out1]).then(tot_prob,None,fin)
|
|
|
131 |
|
132 |
with gr.Blocks() as app:
|
133 |
with gr.Column():
|
134 |
+
inp = gr.Pil()
|
135 |
in_url=gr.Textbox(label="Image URL")
|
136 |
with gr.Row():
|
137 |
load_btn=gr.Button("Load URL")
|
138 |
btn = gr.Button("Detect AI")
|
139 |
mes = gr.HTML("""""")
|
|
|
140 |
with gr.Group():
|
141 |
with gr.Row():
|
142 |
+
fin=gr.Label(label="Final Probability")
|
143 |
+
with gr.Row():
|
144 |
+
with gr.Column():
|
145 |
lab0 = gr.HTML(f"""<b>Testing on Model: <a href='https://huggingface.co/{models[0]}'>{models[0]}</a></b>""")
|
146 |
+
with gr.Column():
|
147 |
lab1 = gr.HTML(f"""<b>Testing on Model: <a href='https://huggingface.co/{models[1]}'>{models[1]}</a></b>""")
|
148 |
+
with gr.Column():
|
149 |
lab2 = gr.HTML(f"""<b>Testing on Model: <a href='https://huggingface.co/{models[2]}'>{models[2]}</a></b>""")
|
150 |
|
151 |
with gr.Row():
|
|
|
159 |
n_out2=gr.Label(label="Output")
|
160 |
outp2 = gr.HTML("""""")
|
161 |
|
162 |
+
|
|
|
163 |
load_btn.click(load_url,in_url,[inp,mes])
|
164 |
btn.click(aiornot0,[inp],[outp0,n_out0]).then(tot_prob,None,fin)
|
165 |
btn.click(aiornot1,[inp],[outp1,n_out1]).then(tot_prob,None,fin)
|