Spaces:
Runtime error
Runtime error
File size: 691 Bytes
7a89bde 931abd0 7a89bde 83e703d 7a89bde 5588cb0 7a89bde 83e703d 5588cb0 83e703d 7a89bde |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import json
import streamlit as st
import requests
from typing import Callable
from components import authors, user_greetings, add_logo
def mainlayout(func: Callable):
def wrapper():
with open("layouts/st_page_layouts.json", "r", encoding="utf-8") as f:
st_page_layouts = json.load(f)
st.set_page_config(
**st_page_layouts[
f"{func.__name__}"
if func.__name__ in st_page_layouts.keys()
else "home"
]
)
add_logo("images/studybotlogo.svg", svg=True)
st.markdown("# Studybot 📚")
user_greetings()
authors()
func()
return wrapper
|