Skip to content
Snippets Groups Projects
Commit e7088052 authored by fima's avatar fima :beers:
Browse files

Merge branch 'css_for_platform' into 'main'

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

See merge request !36
parents 35c27661 9abc5565
No related branches found
No related tags found
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