Wauplin HF staff commited on
Commit
5575bc2
1 Parent(s): a7fe398

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,11 +1,11 @@
1
  import gradio as gr
2
 
3
  from pathlib import Path
 
4
 
5
-
6
- README_PATH = Path(__file__).parent / "README.md"
7
 
8
  with gr.Blocks() as demo:
9
- gr.Markdown(README_PATH.read_text().split("---")[-1].strip())
10
 
11
  demo.launch()
 
1
  import gradio as gr
2
 
3
  from pathlib import Path
4
+ from huggingface_hub import ModelCard
5
 
6
+ modelcard = ModelCard.load(Path(__file__).parent / "README.md")
 
7
 
8
  with gr.Blocks() as demo:
9
+ gr.Markdown(modelcard.text)
10
 
11
  demo.launch()