sergiomar73's picture
Update app.py
9bf2be7
raw
history blame
935 Bytes
import gradio as gr
import os
def compare_text(source, target):
return f"{os.environ.get('ORGANIZATION')} > {os.environ.get('API_KEY')}"
with gr.Blocks(css=".gradio-container { background-color: white; background-image: url('file=https://res.cloudinary.com/crunchbase-production/image/upload/c_lpad,h_256,w_256,f_auto,q_auto:eco,dpr_1/v1448402436/lwt1fdq69mdwal1jk894.png'); background-size: 100px 100px; background-repeat: no-repeat; background-position: 0px 0px; }") as demo:
gr.Markdown("# Text comparer")
with gr.Row():
source = gr.Textbox(lines=3, label="Text to be compared", placeholder="Source text")
with gr.Row():
target = gr.Textbox(lines=3, label="Target phrases", placeholder="Target text")
btn = gr.Button(value="Compare!", variant="primary")
with gr.Row():
label = gr.Label()
btn.click(fn=compare_text, inputs=[source,target], outputs=[label])
demo.launch(debug=True)