rodrigomasini's picture
Update app.py
412e314 verified
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 17 2024
@author: rodrigo@conceptatech.com
"""
# Importing required modules
# Gradio already are part of HuggingFace instance, that is the reason for lacking requirements.txt file
import gradio as gr
import os
# Fetching environment variable
A1_source = os.getenv("CHAT")
A2_source = os.getenv("IMAGEN")
A3_source = os.getenv("WEBAG")
A1 = gr.HTML(
value=(f"""
<div style="display: flex; justify-content: center;">
<iframe
src={A1_source}
frameborder="0"
width="1245"
height="900"
style="
-webkit-text-size-adjust: 100%;
tab-size: 4;
-webkit-tap-highlight-color: transparent;
display: block;
"
></iframe>
</div>"""),
)
A2 = gr.HTML(
value=(f"""
<div style="display: flex; justify-content: center;">
<iframe
src={A2_source}
frameborder="0"
width="1245"
height="1000"
style="
-webkit-text-size-adjust: 100%;
tab-size: 4;
-webkit-tap-highlight-color: transparent;
display: block;
"
></iframe>
</div>"""),
)
A3 = gr.HTML(
value=(f"""
<div style="display: flex; justify-content: center;">
<iframe
src={A3_source}
frameborder="0"
width="1245"
height="1000"
style="
-webkit-text-size-adjust: 100%;
tab-size: 4;
-webkit-tap-highlight-color: transparent;
display: block;
"
></iframe>
</div>"""),
)
clp = gr.TabbedInterface([A1, A2, A3], ["Chat", "Create Image", "AI web search"], theme='sudeepshouche/minimalist')
clp.queue().launch()