saphir / app /index.html
pytzen's picture
feature: h1 link
f60b831
raw
history blame
3.39 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>saphir.ai</title>
<link rel="stylesheet" type="text/css" href="/static/styles.css">
</head>
<body>
<div class="container">
<h1><a href="https://saphir.ai">saphir.ai</a></h1>
<h2>Hugging Face Experiment</h2>
<p>This is a simple HTML response from FastAPI.</p>
</div>
<div class="container">
<h3>Using the Swagger UI for the Chatbot</h3>
<ol>
<li>Go to the Swagger UI by visiting <a href="https://pytzen-saphir.hf.space/docs">this link</a>.</li>
<li>Scroll down to the <code>/chatbot</code> POST method section.</li>
<li>Click on the <code>Try it out</code> button.</li>
<li>In the <code>question</code> field, enter: <strong>"What is the capital of France?"</strong></li>
<li>In the <code>context</code> field, enter: <strong>"France is a country in Western Europe. It has several beautiful cities, including Paris, which is its capital. France is known for its wine, sophisticated cuisine, and landmarks like the Eiffel Tower."</strong></li>
<li>Click the <code>Execute</code> button to submit the request.</li>
<li>Scroll down to see the server response, where you will find the answer.</li>
</ol>
<p>Try it out with different questions and contexts to see how the chatbot responds!</p>
</div>
<div class="container">
<h3>About the Chatbot Model</h3>
<p>The chatbot is powered by the <strong>'distilbert-base-cased-distilled-squad'</strong> model from Hugging Face's Transformers library. This model is a distilled version of BERT, optimized for question-answering tasks. It has been trained on the SQuAD dataset (Stanford Question Answering Dataset), which consists of questions posed by crowdworkers on a set of Wikipedia articles, where the answer to every question is a segment of text from the corresponding reading passage.</p>
<p>What sets this model apart is its ability to provide context-based answers. For the model to accurately answer a question, it requires a context β€” a paragraph or text where the answer is likely to be found. The model uses this context to understand the question and extract the relevant answer. Without sufficient context, the model may not provide accurate or relevant answers.</p>
<p>Therefore, when using the chatbot, it's important to provide a well-defined question along with a comprehensive context that contains the information needed to answer the question. The example of finding the capital of France illustrates this: the context provided gives the model enough information to identify 'Paris' as the correct answer.</p>
</div>
<div class="container">
<h3>FastAPI ReDoc Documentation</h3>
<p>For an alternative documentation format, you can view the ReDoc documentation of the chatbot API. ReDoc provides a more visual and organized layout of the API endpoints and their descriptions. This can be especially helpful for understanding the structure and capabilities of the API in a more user-friendly format.</p>
<p>Access the ReDoc documentation by clicking <a href="https://pytzen-saphir.hf.space/redoc">here</a>.</p>
</div>
</body>
</html>