Skip to content
Snippets Groups Projects
Commit 9abc5565 authored by ofhkr's avatar ofhkr
Browse files

get_css internal tool for reading gradio.css as a string.

parent 35c27661
Branches
Tags
1 merge request!36get_css internal tool for reading gradio.css as a string.
...@@ -293,3 +293,15 @@ def run_gradio_app(gradio_interface): ...@@ -293,3 +293,15 @@ def run_gradio_app(gradio_interface):
# Run the FastAPI server usign uvicorn # Run the FastAPI server usign uvicorn
run(app, host="0.0.0.0", port=int(port)) run(app, host="0.0.0.0", port=int(port))
def get_css():
current_directory = os.path.dirname(os.path.abspath(__file__))
parent_directory = os.path.abspath(os.path.join(current_directory, os.pardir))
css_path = os.path.join(parent_directory,"css","gradio.css")
with open(css_path,'r') as file:
css_content = file.read()
return css_content
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment