File size: 3,427 Bytes
3e9ecbf 13121b5 6b3fef0 13121b5 6b3fef0 13121b5 6b3fef0 13121b5 6b3fef0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pytzen/saphir</title>
<link rel="stylesheet" type="text/css" href="/static/styles.css">
</head>
<body>
<div class="container">
<h1>Hugging Face Experiment</h1>
<h2>"distilbert-base-cased-distilled-squad" model</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" target="_blank">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" target="_blank">here</a>.</p>
</div>
</body>
</html>
|