Skip to content
Snippets Groups Projects

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

Merged ofhkr requested to merge css_for_platform into main
1 file
+ 12
0
Compare changes
  • Side-by-side
  • Inline
+ 12
0
@@ -293,3 +293,15 @@ def run_gradio_app(gradio_interface):
# Run the FastAPI server usign uvicorn
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
Loading