priyanka0394 Claude Opus 4.6 (1M context) commited on
Commit
4c40941
·
1 Parent(s): daa297c

fix: TRUS-588 - Prepare evaluate app for HuggingFace Spaces deployment

Browse files

Pin Gradio to 6.14.0, use Python 3.11 for HF compatibility, fix
trailing separator in header links, add empty-state message for API errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +4 -1
  3. requirements.txt +1 -1
README.md CHANGED
@@ -4,7 +4,7 @@ colorFrom: blue
4
  colorTo: green
5
  sdk: gradio
6
  sdk_version: 6.14.0
7
- python_version: '3.13'
8
  app_file: app.py
9
  pinned: true
10
  short_description: 'Look up TrustScores, compare AI models, and get badge embed code'
 
4
  colorTo: green
5
  sdk: gradio
6
  sdk_version: 6.14.0
7
+ python_version: '3.11'
8
  app_file: app.py
9
  pinned: true
10
  short_description: 'Look up TrustScores, compare AI models, and get badge embed code'
app.py CHANGED
@@ -426,13 +426,16 @@ with gr.Blocks(title="TrustModel — AI Evaluation", css=CUSTOM_CSS, theme=theme
426
  <p style="margin-top:12px !important;font-size:0.85rem !important;">
427
  <a href="https://trustmodel.ai">TrustModel.ai</a>
428
  <a href="https://trustmodel.ai/developers">API &amp; SDKs</a> &nbsp;&middot;&nbsp;
429
- <a href="https://trustmodel.ai/leaderboard">Full Leaderboard</a> &nbsp;&middot;&nbsp;
430
  </p>
431
  </div>""")
432
 
433
  with gr.Tab("Model Lookup"):
434
  gr.Markdown("Select a model to view its TrustScore across all 10 trust dimensions and get a badge for your model card.")
435
 
 
 
 
436
  model_dropdown = gr.Dropdown(
437
  choices=model_names,
438
  label="Select a Model",
 
426
  <p style="margin-top:12px !important;font-size:0.85rem !important;">
427
  <a href="https://trustmodel.ai">TrustModel.ai</a>
428
  <a href="https://trustmodel.ai/developers">API &amp; SDKs</a> &nbsp;&middot;&nbsp;
429
+ <a href="https://trustmodel.ai/leaderboard">Full Leaderboard</a>
430
  </p>
431
  </div>""")
432
 
433
  with gr.Tab("Model Lookup"):
434
  gr.Markdown("Select a model to view its TrustScore across all 10 trust dimensions and get a badge for your model card.")
435
 
436
+ if not model_names:
437
+ gr.HTML('<p style="color:#ef4444;font-weight:600;text-align:center;">Unable to load models. Please refresh the page.</p>')
438
+
439
  model_dropdown = gr.Dropdown(
440
  choices=model_names,
441
  label="Select a Model",
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- gradio>=4.0.0
2
  requests
 
1
+ gradio==6.14.0
2
  requests