Ismetdh commited on
Commit
5a85659
·
verified ·
1 Parent(s): d49b9c3

Deployment test

Browse files

Added app.py and requirement.py for the test deployment. It is yet to connect with models.

Files changed (2) hide show
  1. app.py +60 -0
  2. requirements.txt +1 -0
app.py ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from streamlit_pills import pills
3
+ st.markdown("<h1 style='font-size: 50px;'>QuantumQuest</h1>", unsafe_allow_html=True)
4
+
5
+ st.markdown("""
6
+ <style>
7
+ .category-button {
8
+ background-color: #4CAF50; /* Green */
9
+ border: none;
10
+ width: 150px; /* Set fixed width */
11
+ height: 50px; /* Set fixed height */
12
+ color: white;
13
+ padding: 10px 24px;
14
+ text-align: center;
15
+ text-decoration: none;
16
+ display: inline-block;
17
+ font-size: 16px;
18
+ margin: 4px 2px;
19
+ cursor: pointer;
20
+ border-radius: 8px;
21
+ transition-duration: 0.4s;
22
+ }
23
+
24
+ .category-button:hover {
25
+ background-color: #3e8e41;
26
+ color: white;
27
+ }
28
+ </style>
29
+ """, unsafe_allow_html=True)
30
+
31
+
32
+ # List of categories
33
+ categories = ["All","International News", "Sports", "Business", "Science/Tech", "Politics", "Entertainment", "Others"]
34
+
35
+ num_columns = 3 # Adjust based on how many buttons per row you want
36
+ rows = [categories[i:i + num_columns] for i in range(0, len(categories), num_columns)]
37
+
38
+ tab1, tab2 = st.tabs([ "Categories","Popular News"])
39
+
40
+
41
+
42
+ with tab1:
43
+
44
+ with st.container():
45
+ st.header("Categories")
46
+ selection = pills("", categories)
47
+ st.write(f"You have selected {selection}")
48
+
49
+
50
+
51
+
52
+ with tab2:
53
+ col1,col2 = st.columns([3,1])
54
+ with col1:
55
+
56
+ st.header("Recent News")
57
+
58
+ with col2:
59
+ st.button("Update")
60
+ st.write("Demo goes here")
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ streamlit_pills