rymc commited on
Commit
5fad2f1
·
verified ·
1 Parent(s): 1713513

add getting started info

Browse files
Files changed (1) hide show
  1. app.py +47 -1
app.py CHANGED
@@ -5,6 +5,7 @@ import plotly.express as px
5
  from gradio_leaderboard import Leaderboard, ColumnFilter, SelectColumns
6
  from apscheduler.schedulers.background import BackgroundScheduler
7
  from huggingface_hub import snapshot_download
 
8
 
9
  from src.about import (
10
  CITATION_BUTTON_LABEL,
@@ -174,7 +175,7 @@ with demo:
174
  <a href="https://platform.kluster.ai/verify" target="_blank">
175
  Verify
176
  </a> by
177
- <a href="https://platform.kluster.ai/" target="_blank">
178
  kluster.ai
179
  </a> which provides an API for detecting hallucinations with any model.
180
  </div>
@@ -214,6 +215,51 @@ with demo:
214
  # ---------- Leaderboard ----------
215
  leaderboard = init_leaderboard(LEADERBOARD_DF)
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  with gr.TabItem("📝 Details", elem_id="llm-benchmark-tab-table", id=2):
218
  gr.Markdown((Path(__file__).parent / "docs.md").read_text())
219
 
 
5
  from gradio_leaderboard import Leaderboard, ColumnFilter, SelectColumns
6
  from apscheduler.schedulers.background import BackgroundScheduler
7
  from huggingface_hub import snapshot_download
8
+ import textwrap
9
 
10
  from src.about import (
11
  CITATION_BUTTON_LABEL,
 
175
  <a href="https://platform.kluster.ai/verify" target="_blank">
176
  Verify
177
  </a> by
178
+ <a href="https://kluster.ai/" target="_blank">
179
  kluster.ai
180
  </a> which provides an API for detecting hallucinations with any model.
181
  </div>
 
215
  # ---------- Leaderboard ----------
216
  leaderboard = init_leaderboard(LEADERBOARD_DF)
217
 
218
+ # ---------- Get Started with Verify ----------
219
+ verify_markdown = textwrap.dedent(
220
+ """
221
+ ## Get started with Verify by kluster.ai
222
+
223
+ Verify is an intelligent agent that validates LLM outputs in real-time.
224
+
225
+ - **Blog post:** [Introducing Verify by kluster.ai](https://www.kluster.ai/blog/introducing-verify-by-kluster-ai-the-missing-trust-layer-in-your-ai-stack)
226
+ - **Documentation:** [Verify overview & API reference](https://docs.kluster.ai/get-started/verify/overview/)
227
+ - **Try it out in your browser:** [kluster.ai platform](https://platform.kluster.ai/verify)
228
+
229
+ ### Quick API examples
230
+ """
231
+ )
232
+
233
+ gr.Markdown(verify_markdown, elem_classes="markdown-text")
234
+
235
+ code_example_reliability = textwrap.dedent(
236
+ r"""curl -X POST https://api.kluster.ai/v1/verify/reliability \
237
+ -H "Authorization: Bearer YOUR_API_KEY" \
238
+ -H "Content-Type: application/json" \
239
+ -d '{
240
+ "prompt": "Tell me about the new iPhone 20 features",
241
+ "output": "The iPhone 20 includes a revolutionary holographic display, 200MP camera with AI scene detection, and can project 3D holograms up to 6 feet away for video calls.",
242
+ "context": null
243
+ }'"""
244
+ )
245
+
246
+ gr.Code(code_example_reliability, language="shell")
247
+
248
+ code_example_chat = textwrap.dedent(
249
+ r"""curl -X POST https://api.kluster.ai/v1/chat/completions \
250
+ -H "Authorization: Bearer YOUR_API_KEY" \
251
+ -H "Content-Type: application/json" \
252
+ -d '{
253
+ "model": "klusterai/verify-reliability",
254
+ "messages": [
255
+ { "role": "user", "content": "What can you tell me about Milos Burger Joint?" },
256
+ { "role": "assistant", "content": "Milos Burger Joint has been serving authentic Burgers cuisine since 1999 and just won 2 Michelin stars last week, making it the highest-rated burger restaurant in the city." }
257
+ ]
258
+ }'"""
259
+ )
260
+
261
+ gr.Code(code_example_chat, language="shell")
262
+
263
  with gr.TabItem("📝 Details", elem_id="llm-benchmark-tab-table", id=2):
264
  gr.Markdown((Path(__file__).parent / "docs.md").read_text())
265