Spaces:
Running
Running
Upload app.py
Browse files
app.py
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
import streamlit as st
|
4 |
+
import streamlit.components.v1 as components
|
5 |
+
|
6 |
+
from pages.nav import Navbar
|
7 |
+
from pages.utils import start_server
|
8 |
+
|
9 |
+
|
10 |
+
certificate = os.getenv('PRIVATE_KEY')
|
11 |
+
dns_name = os.getenv('SERVER_DNS_NAME')
|
12 |
+
|
13 |
+
|
14 |
+
def main():
|
15 |
+
|
16 |
+
## Set Streamlit configuration
|
17 |
+
st.set_page_config(page_title='Merlion-AI-Audio', page_icon = "🔥", layout='wide')
|
18 |
+
|
19 |
+
Navbar()
|
20 |
+
|
21 |
+
## Set up home page Title
|
22 |
+
col1, col2 = st.columns([1, 4])
|
23 |
+
custom_html = """
|
24 |
+
<div class="banner">
|
25 |
+
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRhB2e_AhOe11wKxnnwOmOVg9E7J1MBgiTeYzzFAESwcCP5IbBAc2X8BwGChMfJzwqtVg&usqp=CAU" alt="Banner Image">
|
26 |
+
</div>
|
27 |
+
<style>
|
28 |
+
.banner {
|
29 |
+
width: 100%;
|
30 |
+
height: 200px;
|
31 |
+
overflow: visible;
|
32 |
+
}
|
33 |
+
.banner img {
|
34 |
+
width: 100%;
|
35 |
+
object-fit: cover;
|
36 |
+
}
|
37 |
+
</style>
|
38 |
+
"""
|
39 |
+
with col1:
|
40 |
+
components.html(custom_html)
|
41 |
+
with col2:
|
42 |
+
st.write("# Welcome to Merlion AI - AudioLLMs 🤖")
|
43 |
+
|
44 |
+
## Set up home page other information
|
45 |
+
st.markdown('')
|
46 |
+
|
47 |
+
|
48 |
+
if __name__ == '__main__':
|
49 |
+
start_server(certificate, dns_name)
|
50 |
+
main()
|