1<!doctype html> 2<html 3 lang="en" 4 style=" 5 margin: 0; 6 padding: 0; 7 min-height: 100%; 8 display: flex; 9 flex-direction: column; 10 " 11> 12 <head> 13 <meta charset="utf-8" /> 14 <meta 15 name="viewport" 16 content="width=device-width, initial-scale=1, shrink-to-fit=no" 17 /> 18 <meta property="og:title" content="Gradio" /> 19 <meta property="og:type" content="website" /> 20 <meta property="og:url" content="{url}" /> 21 <meta property="og:description" content="Click to try out the app!" /> 22 <meta 23 property="og:image" 24 content="https://raw.githubusercontent.com/gradio-app/gradio/main/js/_website/src/lib/assets/img/header-image.jpg" 25 /> 26 <meta name="twitter:card" content="summary_large_image" /> 27 <meta name="twitter:creator" content="@Gradio" /> 28 <meta name="twitter:title" content="Gradio" /> 29 <meta name="twitter:description" content="Click to try out the app!" /> 30 <meta 31 name="twitter:image" 32 content="https://raw.githubusercontent.com/gradio-app/gradio/main/js/_website/src/lib/assets/img/header-image.jpg" 33 /> 34 35 <style> 36 :root { 37 --bg: white; 38 --col: #27272a; 39 --bg-dark: #0f0f11; 40 --col-dark: #f4f4f5; 41 } 42 43 44 body { 45 background: var(--bg); 46 color: var(--col); 47 font-family: Arial, Helvetica, sans-serif; 48 } 49 50 @media (prefers-color-scheme: dark) { 51 body { 52 background: var(--bg-dark); 53 color: var(--col-dark); 54 } 55 } 56 </style> 57 58 <meta property="og:url" content="https://gradio.app/" /> 59 <meta property="og:type" content="website" /> 60 <meta property="og:image" content="" /> 61 <meta property="og:title" content="Gradio" /> 62 <meta 63 property="og:description" 64 content="" 65 /> 66 <meta name="twitter:card" content="summary_large_image" /> 67 <meta name="twitter:creator" content="@teamGradio" /> 68 <meta name="twitter:title" content="Gradio" /> 69 <meta 70 name="twitter:description" 71 content="" 72 /> 73 <meta name="twitter:image" content="" /> 74 75
75<script>window.gradio_config = {"version":"6.14.0","api_prefix":"/gradio_api","mode":"blocks","app_id":8819693178934711849,"dev_mode":false,"vibe_mode":false,"analytics_enabled":true,"components":[{"id":1,"type":"markdown","props":{"value":"# SmolLM2 Smart Assistant","show_label":false,"rtl":false,"latex_delimiters":[{"left":"$$","right":"$$","display":true}],"visible":true,"elem_classes":[],"preserved_by_key":["value"],"sanitize_html":true,"line_breaks":false,"header_links":false,"container":false,"padding":false,"name":"markdown","_selectable":false},"skip_api":false,"component_class_id":"927e99ba5dda4bcd0dfe596d4d0cecdc2e0b41e7e95071a05f96ae3971390ed6","key":null,"api_info":{"type":"string"},"api_info_as_input":{"type":"string"},"api_info_as_output":{"type":"string"},"example_inputs":"# Hello!"},{"id":2,"type":"file","props":{"file_count":"single","file_types":[".pdf"],"type":"filepath","label":"Upload PDF (optional)","show_label":true,"container":true,"min_width":160,"visible":true,"elem_classes":[],"preserved_by_key":["value"],"allow_reordering":false,"buttons":[],"name":"file","_selectable":false},"skip_api":false,"component_class_id":"f12bf7256389942af664b7cc37ada7c2c0de13afbc7585f3b57fdc557512251b","key":null,"api_info":{"$defs":{"FileDataMeta":{"properties":{"_type":{"const":"gradio.FileData","title":"Type","type":"string"}},"required":["_type"],"title":"FileDataMeta","type":"object"}},"properties":{"path":{"title":"Path","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Size"},"orig_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Orig Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mime Type"},"is_stream":{"default":false,"title":"Is Stream","type":"boolean"},"meta":{"$ref":"#/$defs/FileDataMeta"}},"required":["path"],"title":"FileData","type":"object","additional_description":"The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n path: The server file path where the file is stored.\n url: The normalized server URL pointing to the file.\n size: The size of the file in bytes.\n orig_name: The original filename before upload.\n mime_type: The MIME type of the file.\n is_stream: Indicates whether the file is a stream.\n meta: Additional metadata used internally (should not be changed)."},"api_info_as_input":{"$defs":{"FileDataMeta":{"properties":{"_type":{"const":"gradio.FileData","title":"Type","type":"string"}},"required":["_type"],"title":"FileDataMeta","type":"object"}},"properties":{"path":{"title":"Path","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Size"},"orig_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Orig Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mime Type"},"is_stream":{"default":false,"title":"Is Stream","type":"boolean"},"meta":{"$ref":"#/$defs/FileDataMeta"}},"required":["path"],"title":"FileData","type":"object","additional_description":"The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n path: The server file path where the file is stored.\n url: The normalized server URL pointing to the file.\n size: The size of the file in bytes.\n orig_name: The original filename before upload.\n mime_type: The MIME type of the file.\n is_stream: Indicates whether the file is a stream.\n meta: Additional metadata used internally (should not be changed)."},"api_info_as_output":{"$defs":{"FileDataMeta":{"properties":{"_type":{"const":"gradio.FileData","title":"Type","type":"string"}},"required":["_type"],"title":"FileDataMeta","type":"object"}},"properties":{"path":{"title":"Path","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Size"},"orig_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Orig Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mime Type"},"is_stream":{"default":false,"title":"Is Stream","type":"boolean"},"meta":{"$ref":"#/$defs/FileDataMeta"}},"required":["path"],"title":"FileData","type":"object","additional_description":"The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n path: The server file path where the file is stored.\n url: The normalized server URL pointing to the file.\n size: The size of the file in bytes.\
75n orig_name: The original filename before upload.\n mime_type: The MIME type of the file.\n is_stream: Indicates whether the file is a stream.\n meta: Additional metadata used internally (should not be changed)."},"example_inputs":{"path":"https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf","meta":{"_type":"gradio.FileData"},"orig_name":"sample_file.pdf","url":"https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf"}},{"id":3,"type":"chatbot","props":{"_undoable":false,"_retryable":false,"likeable":false,"value":[],"show_label":true,"container":true,"min_width":160,"visible":true,"elem_classes":[],"autoscroll":true,"preserved_by_key":["value"],"height":400,"resizable":false,"latex_delimiters":[{"left":"$$","right":"$$","display":true}],"rtl":false,"buttons":["share","copy","copy_all"],"avatar_images":[null,null],"sanitize_html":true,"render_markdown":true,"feedback_options":["Like","Dislike"],"line_breaks":true,"allow_file_downloads":true,"group_consecutive_messages":true,"allow_tags":true,"like_user_message":false,"name":"chatbot","_selectable":false},"skip_api":false,"component_class_id":"fd83d446c7e167e1617956292f7275b31fd178c28c1bb63211785870d09ed9de","key":null,"api_info":{"$defs":{"ComponentMessage":{"properties":{"component":{"title":"Component","type":"string"},"value":{"title":"Value"},"constructor_args":{"additionalProperties":true,"title":"Constructor Args","type":"object"},"props":{"additionalProperties":true,"title":"Props","type":"object"},"type":{"const":"component","default":"component","title":"Type","type":"string"}},"required":["component","value","constructor_args","props"],"title":"ComponentMessage","type":"object"},"FileData":{"description":"The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n path: The server file path where the file is stored.\n url: The normalized server URL pointing to the file.\n size: The size of the file in bytes.\n orig_name: The original filename before upload.\n mime_type: The MIME type of the file.\n is_stream: Indicates whether the file is a stream.\n meta: Additional metadata used internally (should not be changed).","properties":{"path":{"title":"Path","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Size"},"orig_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Orig Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mime Type"},"is_stream":{"default":false,"title":"Is Stream","type":"boolean"},"meta":{"$ref":"#/$defs/FileDataMeta"}},"required":["path"],"title":"FileData","type":"object"},"FileDataMeta":{"properties":{"_type":{"const":"gradio.FileData","title":"Type","type":"string"}},"required":["_type"],"title":"FileDataMeta","type":"object"},"FileMessage":{"properties":{"file":{"$ref":"#/$defs/FileData"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Alt Text"},"type":{"const":"file","default":"file","title":"Type","type":"string"}},"required":["file"],"title":"FileMessage","type":"object"},"Message":{"properties":{"role":{"title":"Role","type":"string"},"metadata":{"anyOf":[{"$ref":"#/$defs/MetadataDict"},{"type":"null"}],"default":null},"content":{"items":{"anyOf":[{"$ref":"#/$defs/TextMessage"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"}]},"title":"Content","type":"array"},"options":{"anyOf":[{"items":{"$ref":"#/$defs/OptionDict"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"}},"required":["role","content"],"title":"Message","type":"object"},"MetadataDict":{"description":"A typed dictionary to represent metadata for a message in the Chatbot component. An\ninstance of this dictionary is used for the `metadata` field in a ChatMessage when\nthe chat message should be displayed as a thought.\nParameters:\n title: The title of the \"thought\" message. Required if the message is to be displayed as a thought.\n id: The ID of the message. Only used for nested thoughts. Nested thoughts can be nested by setting the parent_id to the id of the parent thought.\n parent_id: The ID of the parent message. Only used for nested thoughts.\n log: A string message to display next to the thought title in a subdued font.\n duration: The duration of the message in seconds. Appears next to the thought title in a subdued font inside a parentheses.\n status: if set to `\"pending\"`, a spinner appears next to the thought title and the accordion is initialized open. If `status` is `\"done\"`, the thought accordion is initialized closed. If `status` is not provided, the thought accordion is initialized open and no spinner is displayed.","properties":{"title":{"title":"Title","type":"string"},"id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Id"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Parent Id"},"log":{"title":"Log","type":"string"},"duration":{"title":"Duration","type":"number"},"status":{"enum":["pending","done"],"title":"Status","type":"string"}},"title":"MetadataDict","type":"object"},"OptionDict":{"description":"A typed dictionary to represent an option in a ChatMessage. A list of these\ndictionaries is used for the `options` field in a ChatMessage.\nParameters:\n value: The value to return when the option is selected.\n label: The text to display in the option, if different from the value.","properties":{"value":{"title":"Value","type":"string"},"label":{"title":"Label","type":"string"}},"required":["value"],"title":"OptionDict","type":"object"},"TextMessage":{"properties":{"text":{"title":"Text","type":"string"}
75,"type":{"const":"text","default":"text","title":"Type","type":"string"}},"required":["text"],"title":"TextMessage","type":"object"}},"items":{"$ref":"#/$defs/Message"},"title":"ChatbotDataMessages","type":"array","additional_description":null},"api_info_as_input":{"$defs":{"ComponentMessage":{"properties":{"component":{"title":"Component","type":"string"},"value":{"title":"Value"},"constructor_args":{"additionalProperties":true,"title":"Constructor Args","type":"object"},"props":{"additionalProperties":true,"title":"Props","type":"object"},"type":{"const":"component","default":"component","title":"Type","type":"string"}},"required":["component","value","constructor_args","props"],"title":"ComponentMessage","type":"object"},"FileData":{"description":"The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n path: The server file path where the file is stored.\n url: The normalized server URL pointing to the file.\n size: The size of the file in bytes.\n orig_name: The original filename before upload.\n mime_type: The MIME type of the file.\n is_stream: Indicates whether the file is a stream.\n meta: Additional metadata used internally (should not be changed).","properties":{"path":{"title":"Path","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Size"},"orig_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Orig Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mime Type"},"is_stream":{"default":false,"title":"Is Stream","type":"boolean"},"meta":{"$ref":"#/$defs/FileDataMeta"}},"required":["path"],"title":"FileData","type":"object"},"FileDataMeta":{"properties":{"_type":{"const":"gradio.FileData","title":"Type","type":"string"}},"required":["_type"],"title":"FileDataMeta","type":"object"},"FileMessage":{"properties":{"file":{"$ref":"#/$defs/FileData"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Alt Text"},"type":{"const":"file","default":"file","title":"Type","type":"string"}},"required":["file"],"title":"FileMessage","type":"object"},"Message":{"properties":{"role":{"title":"Role","type":"string"},"metadata":{"anyOf":[{"$ref":"#/$defs/MetadataDict"},{"type":"null"}],"default":null},"content":{"items":{"anyOf":[{"$ref":"#/$defs/TextMessage"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"}]},"title":"Content","type":"array"},"options":{"anyOf":[{"items":{"$ref":"#/$defs/OptionDict"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"}},"required":["role","content"],"title":"Message","type":"object"},"MetadataDict":{"description":"A typed dictionary to represent metadata for a message in the Chatbot component. An\ninstance of this dictionary is used for the `metadata` field in a ChatMessage when\nthe chat message should be displayed as a thought.\nParameters:\n title: The title of the \"thought\" message. Required if the message is to be displayed as a thought.\n id: The ID of the message. Only used for nested thoughts. Nested thoughts can be nested by setting the parent_id to the id of the parent thought.\n parent_id: The ID of the parent message. Only used for nested thoughts.\n log: A string message to display next to the thought title in a subdued font.\n duration: The duration of the message in seconds. Appears next to the thought title in a subdued font inside a parentheses.\n status: if set to `\"pending\"`, a spinner appears next to the thought title and the accordion is initialized open. If `status` is `\"done\"`, the thought accordion is initialized closed. If `status` is not provided, the thought accordion is initialized open and no spinner is displayed.","properties":{"title":{"title":"Title","type":"string"},"id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Id"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Parent Id"},"log":{"title":"Log","type":"string"},"duration":{"title":"Duration","type":"number"},"status":{"enum":["pending","done"],"title":"Status","type":"string"}},"title":"MetadataDict","type":"object"},"OptionDict":{"description":"A typed dictionary to represent an option in a ChatMessage. A list of these\ndictionaries is used for the `options` field in a ChatMessage.\nParameters:\n value: The value to return when the option is selected.\n label: The text to display in the option, if different from the value.","properties":{"value":{"title":"Value","type":"string"},"label":{"title":"Label","type":"string"}},"required":["value"],"title":"OptionDict","type":"object"},"TextMessage":{"properties":{"text":{"title":"Text","type":"string"}
75,"type":{"const":"text","default":"text","title":"Type","type":"string"}},"required":["text"],"title":"TextMessage","type":"object"}},"items":{"$ref":"#/$defs/Message"},"title":"ChatbotDataMessages","type":"array","additional_description":null},"api_info_as_output":{"$defs":{"ComponentMessage":{"properties":{"component":{"title":"Component","type":"string"},"value":{"title":"Value"},"constructor_args":{"additionalProperties":true,"title":"Constructor Args","type":"object"},"props":{"additionalProperties":true,"title":"Props","type":"object"},"type":{"const":"component","default":"component","title":"Type","type":"string"}},"required":["component","value","constructor_args","props"],"title":"ComponentMessage","type":"object"},"FileData":{"description":"The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n path: The server file path where the file is stored.\n url: The normalized server URL pointing to the file.\n size: The size of the file in bytes.\n orig_name: The original filename before upload.\n mime_type: The MIME type of the file.\n is_stream: Indicates whether the file is a stream.\n meta: Additional metadata used internally (should not be changed).","properties":{"path":{"title":"Path","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Size"},"orig_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Orig Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mime Type"},"is_stream":{"default":false,"title":"Is Stream","type":"boolean"},"meta":{"$ref":"#/$defs/FileDataMeta"}},"required":["path"],"title":"FileData","type":"object"},"FileDataMeta":{"properties":{"_type":{"const":"gradio.FileData","title":"Type","type":"string"}},"required":["_type"],"title":"FileDataMeta","type":"object"},"FileMessage":{"properties":{"file":{"$ref":"#/$defs/FileData"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Alt Text"},"type":{"const":"file","default":"file","title":"Type","type":"string"}},"required":["file"],"title":"FileMessage","type":"object"},"Message":{"properties":{"role":{"title":"Role","type":"string"},"metadata":{"anyOf":[{"$ref":"#/$defs/MetadataDict"},{"type":"null"}],"default":null},"content":{"items":{"anyOf":[{"$ref":"#/$defs/TextMessage"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"}]},"title":"Content","type":"array"},"options":{"anyOf":[{"items":{"$ref":"#/$defs/OptionDict"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"}},"required":["role","content"],"title":"Message","type":"object"},"MetadataDict":{"description":"A typed dictionary to represent metadata for a message in the Chatbot component. An\ninstance of this dictionary is used for the `metadata` field in a ChatMessage when\nthe chat message should be displayed as a thought.\nParameters:\n title: The title of the \"thought\" message. Required if the message is to be displayed as a thought.\n id: The ID of the message. Only used for nested thoughts. Nested thoughts can be nested by setting the parent_id to the id of the parent thought.\n parent_id: The ID of the parent message. Only used for nested thoughts.\n log: A string message to display next to the thought title in a subdued font.\n duration: The duration of the message in seconds. Appears next to the thought title in a subdued font inside a parentheses.\n status: if set to `\"pending\"`, a spinner appears next to the thought title and the accordion is initialized open. If `status` is `\"done\"`, the thought accordion is initialized closed. If `status` is not provided, the thought accordion is initialized open and no spinner is displayed.","properties":{"title":{"title":"Title","type":"string"},"id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Id"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Parent Id"},"log":{"title":"Log","type":"string"},"duration":{"title":"Duration","type":"number"},"status":{"enum":["pending","done"],"title":"Status","type":"string"}},"title":"MetadataDict","type":"object"},"OptionDict":{"description":"A typed dictionary to represent an option in a ChatMessage. A list of these\ndictionaries is used for the `options` field in a ChatMessage.\nParameters:\n value: The value to return when the option is selected.\n label: The text to display in the option, if different from the value.","properties":{"value":{"title":"Value","type":"string"},"label":{"title":"Label","type":"string"}},"required":["value"],"title":"OptionDict","type":"object"},"TextMessage":{"properties":{"text":{"title":"Text","type":"string"}
75,"type":{"const":"text","default":"text","title":"Type","type":"string"}},"required":["text"],"title":"TextMessage","type":"object"}},"items":{"$ref":"#/$defs/Message"},"title":"ChatbotDataMessages","type":"array","additional_description":null},"example_inputs":[{"role":"user","metadata":null,"content":[{"text":"Hello!","type":"text"}],"options":null},{"role":"assistant","metadata":null,"content":[{"text":"How can I help you?","type":"text"}],"options":null}]},{"id":4,"type":"textbox","props":{"type":"text","lines":1,"label":"Message","show_label":true,"container":true,"min_width":160,"visible":true,"autofocus":false,"autoscroll":true,"elem_classes":[],"preserved_by_key":["value"],"rtl":false,"buttons":[],"submit_btn":false,"stop_btn":false,"name":"textbox","_selectable":false},"skip_api":false,"component_class_id":"0ad8e7dd48970890cef0fb44101b5b9b5a57422fa28062cfa5b0de927e78f3dc","key":null,"api_info":{"type":"string"},"api_info_as_input":{"type":"string"},"api_info_as_output":{"type":"string"},"example_inputs":"Hello!!"},{"id":5,"type":"button","props":{"value":"Clear","variant":"secondary","size":"lg","link_target":"_self","visible":true,"interactive":true,"elem_classes":[],"preserved_by_key":["value"],"api_visibility":"undocumented","name":"button","_selectable":false},"skip_api":true,"component_class_id":"74461015a9294616e84e7fe7bd32814bf5417b55fbe8b0b23056cc4e5045a65f","key":null},{"id":6,"type":"form","props":{"scale":0,"min_width":0,"preserved_by_key":[],"name":"form"},"skip_api":true,"component_class_id":"ed5cd51f569f3a7624b1709c4e7e50a5a608037f5fb82307671a5cec77e36b71","key":null}],"css":null,"connect_heartbeat":false,"js":null,"head":null,"title":"Gradio","space_id":null,"enable_queue":true,"show_error":false,"footer_links":["api","gradio","settings"],"is_colab":false,"max_file_size":null,"stylesheets":["https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600\u0026display=swap"],"theme":"default","protocol":"sse_v3","body_css":{"body_background_fill":"white","body_text_color":"#27272a","body_background_fill_dark":"#0f0f11","body_text_color_dark":"#f4f4f5"},"fill_height":false,"fill_width":false,"theme_hash":"078b53afbcde6e67684be7a1e3236158d24ca87d4009f3a800e3e7b202955106","pwa":false,"pages":[["","Home",true]],"page":{"":{"layout":{"id":0,"children":[{"id":1},{"id":2},{"id":3},{"id":6,"children":[{"id":4}]},{"id":5}]},"components":[1,2,3,4,5,6],"dependencies":[0,1]}},"mcp_server":false,"i18n_translations":null,"dependencies":[{"id":0,"targets":[[5,"click"]],"inputs":[],"outputs":[4,3,2],"backend_fn":false,"js":"() =\u003e [null, [], null]","queue":false,"api_name":"js_fn","api_description":null,"scroll_to_output":false,"show_progress":"full","show_progress_on":null,"batch":false,"max_batch_size":4,"cancels":[],"types":{"generator":false,"cancel":false},"collects_event_data":false,"trigger_after":null,"trigger_only_on_success":false,"trigger_only_on_failure":false,"trigger_mode":"once","api_visibility":"private","rendered_in":null,"render_id":null,"connection":"sse","time_limit":null,"stream_every":0.5,"event_specific_args":null,"component_prop_inputs":[],"js_implementation":null},{"id":1,"targets":[[4,"submit"]],"inputs":[4,3,2],"outputs":[4,3],"backend_fn":true,"js":null,"queue":true,"api_name":"respond","api_description":null,"scroll_to_output":false,"show_progress":"full","show_progress_on":null,"batch":false,"max_batch_size":4,"cancels":[],"types":{"generator":false,"cancel":false},"collects_event_data":false,"trigger_after":null,"trigger_only_on_success":false,"trigger_only_on_failure":false,"trigger_mode":"once","api_visibility":"public","rendered_in":null,"render_id":null,"connection":"sse","time_limit":null,"stream_every":0.5,"event_specific_args":null,"component_prop_inputs":[],"js_implementation":null}],"layout":{"id":0,"children":[{"id":1},{"id":2},{"id":3},{"id":6,"children":[{"id":4}]},{"id":5}]},"username":null,"deep_link_state":"none","current_page":"","root":"https://sirzmkk-chat.hf.space"};</script>
75<script>window.gradio_api_info = {"named_endpoints":{"/respond":{"parameters":[{"label":"Message","parameter_name":"message","parameter_has_default":false,"parameter_default":null,"type":{"type":"string"},"python_type":{"type":"str","description":""},"component":"Textbox","example_input":"Hello!!"},{"label":"parameter_3","parameter_name":"chat_history","parameter_has_default":true,"parameter_default":[],"type":{"$defs":{"ComponentMessage":{"properties":{"component":{"title":"Component","type":"string"},"value":{"title":"Value"},"constructor_args":{"additionalProperties":true,"title":"Constructor Args","type":"object"},"props":{"additionalProperties":true,"title":"Props","type":"object"},"type":{"const":"component","default":"component","title":"Type","type":"string"}},"required":["component","value","constructor_args","props"],"title":"ComponentMessage","type":"object"},"FileData":{"description":"The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n path: The server file path where the file is stored.\n url: The normalized server URL pointing to the file.\n size: The size of the file in bytes.\n orig_name: The original filename before upload.\n mime_type: The MIME type of the file.\n is_stream: Indicates whether the file is a stream.\n meta: Additional metadata used internally (should not be changed).","properties":{"path":{"title":"Path","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Size"},"orig_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Orig Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mime Type"},"is_stream":{"default":false,"title":"Is Stream","type":"boolean"},"meta":{"$ref":"#/$defs/FileDataMeta"}},"required":["path"],"title":"FileData","type":"object"},"FileDataMeta":{"properties":{"_type":{"const":"gradio.FileData","title":"Type","type":"string"}},"required":["_type"],"title":"FileDataMeta","type":"object"},"FileMessage":{"properties":{"file":{"$ref":"#/$defs/FileData"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Alt Text"},"type":{"const":"file","default":"file","title":"Type","type":"string"}},"required":["file"],"title":"FileMessage","type":"object"},"Message":{"properties":{"role":{"title":"Role","type":"string"},"metadata":{"anyOf":[{"$ref":"#/$defs/MetadataDict"},{"type":"null"}],"default":null},"content":{"items":{"anyOf":[{"$ref":"#/$defs/TextMessage"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"}]},"title":"Content","type":"array"},"options":{"anyOf":[{"items":{"$ref":"#/$defs/OptionDict"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"}},"required":["role","content"],"title":"Message","type":"object"},"MetadataDict":{"description":"A typed dictionary to represent metadata for a message in the Chatbot component. An\ninstance of this dictionary is used for the `metadata` field in a ChatMessage when\nthe chat message should be displayed as a thought.\nParameters:\n title: The title of the \"thought\" message. Required if the message is to be displayed as a thought.\n id: The ID of the message. Only used for nested thoughts. Nested thoughts can be nested by setting the parent_id to the id of the parent thought.\n parent_id: The ID of the parent message. Only used for nested thoughts.\n log: A string message to display next to the thought title in a subdued font.\n duration: The duration of the message in seconds. Appears next to the thought title in a subdued font inside a parentheses.\n status: if set to `\"pending\"`, a spinner appears next to the thought title and the accordion is initialized open. If `status` is `\"done\"`, the thought accordion is initialized closed. If `status` is not provided, the thought accordion is initialized open and no spinner is displayed.","properties":{"title":{"title":"Title","type":"string"},"id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Id"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Parent Id"},"log":{"title":"Log","type":"string"},"duration":{"title":"Duration","type":"number"},"status":{"enum":["pending","done"],"title":"Status","type":"string"}},"title":"MetadataDict","type":"object"},"OptionDict":{"description":"A typed dictionary to represent an option in a ChatMessage. A list of these\ndictionaries is used for the `options` field in a ChatMessage.\nParameters:\n value: The value to return when the option is selected.\n label: The text to display in the option, if different from the value.","properties":{"value":{"title":"Value","type":"string"},"label":{"title":"Label","type":"string"}},"required":["value"],"title":"OptionDict","type":"object"},"TextMessage":{"properties":{"text":{"title":"Text","type":"string"}
75,"type":{"const":"text","default":"text","title":"Type","type":"string"}},"required":["text"],"title":"TextMessage","type":"object"}},"items":{"$ref":"#/$defs/Message"},"title":"ChatbotDataMessages","type":"array","additional_description":null},"python_type":{"type":"list[dict(role: str, metadata: dict(title: str, id: int | str, parent_id: int | str, log: str, duration: float, status: Literal[\u0027pending\u0027, \u0027done\u0027]) | None, content: list[dict(text: str, type: Literal[text]) | dict(file: filepath, alt_text: str | None, type: Literal[file]) | dict(component: str, value: Any, constructor_args: dict(str, Any), props: dict(str, Any), type: Literal[component])], options: list[dict(value: str, label: str)] | None)]","description":null},"component":"Chatbot","example_input":[{"role":"user","metadata":null,"content":[{"text":"Hello!","type":"text"}],"options":null},{"role":"assistant","metadata":null,"content":[{"text":"How can I help you?","type":"text"}],"options":null}]},{"label":"Upload PDF (optional)","parameter_name":"pdf_file","parameter_has_default":false,"parameter_default":null,"type":{"$defs":{"FileDataMeta":{"properties":{"_type":{"const":"gradio.FileData","title":"Type","type":"string"}},"required":["_type"],"title":"FileDataMeta","type":"object"}},"properties":{"path":{"title":"Path","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Size"},"orig_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Orig Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mime Type"},"is_stream":{"default":false,"title":"Is Stream","type":"boolean"},"meta":{"$ref":"#/$defs/FileDataMeta"}},"required":["path"],"title":"FileData","type":"object","additional_description":"The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n path: The server file path where the file is stored.\n url: The normalized server URL pointing to the file.\n size: The size of the file in bytes.\n orig_name: The original filename before upload.\n mime_type: The MIME type of the file.\n is_stream: Indicates whether the file is a stream.\n meta: Additional metadata used internally (should not be changed)."},"python_type":{"type":"filepath","description":"The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n path: The server file path where the file is stored.\n url: The normalized server URL pointing to the file.\n size: The size of the file in bytes.\n orig_name: The original filename before upload.\n mime_type: The MIME type of the file.\n is_stream: Indicates whether the file is a stream.\n meta: Additional metadata used internally (should not be changed)."},"component":"File","example_input":{"path":"https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf","meta":{"_type":"gradio.FileData"},"orig_name":"sample_file.pdf","url":"https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf"}}],"returns":[{"label":"Message","type":{"type":"string"},"python_type":{"type":"str","description":""},"component":"Textbox"},{"label":"value_3","type":{"$defs":{"ComponentMessage":{"properties":{"component":{"title":"Component","type":"string"},"value":{"title":"Value"},"constructor_args":{"additionalProperties":true,"title":"Constructor Args","type":"object"},"props":{"additionalProperties":true,"title":"Props","type":"object"},"type":{"const":"component","default":"component","title":"Type","type":"string"}},"required":["component","value","constructor_args","props"],"title":"ComponentMessage","type":"object"},"FileData":{"description":"The FileData class is a subclass of the GradioModel class that represents a file object within a Gradio interface. It is used to store file data and metadata when a file is uploaded.\n\nAttributes:\n path: The server file path where the file is stored.\n url: The normalized server URL pointing to the file.\n size: The size of the file in bytes.\
75n orig_name: The original filename before upload.\n mime_type: The MIME type of the file.\n is_stream: Indicates whether the file is a stream.\n meta: Additional metadata used internally (should not be changed).","properties":{"path":{"title":"Path","type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Url"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"title":"Size"},"orig_name":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Orig Name"},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Mime Type"},"is_stream":{"default":false,"title":"Is Stream","type":"boolean"},"meta":{"$ref":"#/$defs/FileDataMeta"}},"required":["path"],"title":"FileData","type":"object"},"FileDataMeta":{"properties":{"_type":{"const":"gradio.FileData","title":"Type","type":"string"}},"required":["_type"],"title":"FileDataMeta","type":"object"},"FileMessage":{"properties":{"file":{"$ref":"#/$defs/FileData"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Alt Text"},"type":{"const":"file","default":"file","title":"Type","type":"string"}},"required":["file"],"title":"FileMessage","type":"object"},"Message":{"properties":{"role":{"title":"Role","type":"string"},"metadata":{"anyOf":[{"$ref":"#/$defs/MetadataDict"},{"type":"null"}],"default":null},"content":{"items":{"anyOf":[{"$ref":"#/$defs/TextMessage"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"}]},"title":"Content","type":"array"},"options":{"anyOf":[{"items":{"$ref":"#/$defs/OptionDict"},"type":"array"},{"type":"null"}],"default":null,"title":"Options"}},"required":["role","content"],"title":"Message","type":"object"},"MetadataDict":{"description":"A typed dictionary to represent metadata for a message in the Chatbot component. An\ninstance of this dictionary is used for the `metadata` field in a ChatMessage when\nthe chat message should be displayed as a thought.\nParameters:\n title: The title of the \"thought\" message. Required if the message is to be displayed as a thought.\n id: The ID of the message. Only used for nested thoughts. Nested thoughts can be nested by setting the parent_id to the id of the parent thought.\n parent_id: The ID of the parent message. Only used for nested thoughts.\n log: A string message to display next to the thought title in a subdued font.\n duration: The duration of the message in seconds. Appears next to the thought title in a subdued font inside a parentheses.\n status: if set to `\"pending\"`, a spinner appears next to the thought title and the accordion is initialized open. If `status` is `\"done\"`, the thought accordion is initialized closed. If `status` is not provided, the thought accordion is initialized open and no spinner is displayed.","properties":{"title":{"title":"Title","type":"string"},"id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Id"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Parent Id"},"log":{"title":"Log","type":"string"},"duration":{"title":"Duration","type":"number"},"status":{"enum":["pending","done"],"title":"Status","type":"string"}},"title":"MetadataDict","type":"object"},"OptionDict":{"description":"A typed dictionary to represent an option in a ChatMessage. A list of these\ndictionaries is used for the `options` field in a ChatMessage.\nParameters:\n value: The value to return when the option is selected.\n label: The text to display in the option, if different from the value.","properties":{"value":{"title":"Value","type":"string"},"label":{"title":"Label","type":"string"}},"required":["value"],"title":"OptionDict","type":"object"},"TextMessage":{"properties":{"text":{"title":"Text","type":"string"},"type":{"const":"text","default":"text","title":"Type","type":"string"}},"required":["text"],"title":"TextMessage","type":"object"}},"items":{"$ref":"#/$defs/Message"},"title":"ChatbotDataMessages","type":"array","additional_description":null},"python_type":{"type":"list[dict(role: str, metadata: dict(title: str, id: int | str, parent_id: int | str, log: str, duration: float, status: Literal[\u0027pending\u0027, \u0027done\u0027]) | None, content: list[dict(text: str, type: Literal[text]) | dict(file: filepath, alt_text: str | None, type: Literal[file]) | dict(component: str, value: Any, constructor_args: dict(str, Any), props: dict(str, Any), type: Literal[component])], options: list[dict(value: str, label: str)] | None)]","description":""},"component":"Chatbot"}],"api_visibility":"public","description":"","code_snippets":{"python":"from gradio_client import Client, handle_file\n\nclient = Client(\"http://localhost:7860\")\nresult = client.predict(\n\tmessage=\"Hello!!\",\n\tchat_history=[],\n\tpdf_file=handle_file(\u0027https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf\u0027),\n\tapi_name=\"/respond\",\n)\nprint(result)","javascript":"import { Client } from \"@gradio/client\";\n\nconst response_0 = await fetch(\"https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf\");\nconst exampleFile = await response_0.blob();\n\nconst client = await Client.connect(\"http://localhost:7860\");\nconst result = await client.predict(\"/respond\", {\n\t\tmessage: \"Hello!!\",\n\t\tchat_history: [],\n\t\tpdf_file: exampleFile,\n});\n\nconsole.log(result.data);","bash":"FILE_PATH=$(curl -s -X POST http://localhost:7860/gradio_api/upload
75-F \u0027files=@/path/to/your/file\u0027 | tr -d \u0027[]\" \u0027)\n\ncurl -X POST http://localhost:7860/gradio_api/call/v2/respond -s -H \"Content-Type: application/json\" \\\n -d \u0027{\"message\": \"Hello!!\", \"chat_history\": [], \"pdf_file\": {\"path\": \"\u0027$FILE_PATH\u0027\", \"meta\": {\"_type\": \"gradio.FileData\"}}}\u0027 \\\n | awk -F\u0027\"\u0027 \u0027{ print $4}\u0027 \\\n | read EVENT_ID; curl -N http://localhost:7860/gradio_api/call/respond/$EVENT_ID","cli":"{command} predict http://localhost:7860 /respond \u0027{\n \"message\": \"Hello!!\",\n \"chat_history\": [\n {\n \"role\": \"user\",\n \"metadata\": null,\n \"content\": [\n {\n \"text\": \"Hello!\",\n \"type\": \"text\"\n }\n ],\n \"options\": null\n },\n {\n \"role\": \"assistant\",\n \"metadata\": null,\n \"content\": [\n {\n \"text\": \"How can I help you?\",\n \"type\": \"text\"\n }\n ],\n \"options\": null\n }\n ],\n \"pdf_file\": {\n \"path\": \"https://github.com/gradio-app/gradio/raw/main/test/test_files/sample_file.pdf\",\n \"meta\": {\n \"_type\": \"gradio.FileData\"\n }\n }\n}\u0027\n"}}},"unnamed_endpoints":{}};</script>
75 76 77 <link rel="preconnect" href="https://fonts.googleapis.com" /> 78 <link 79 rel="preconnect" 80 href="https://fonts.gstatic.com" 81 crossorigin="anonymous" 82 /> 83
83<script 84 src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.1/iframeResizer.contentWindow.min.js" 85 async 86 ></script>
86 87
87<script data-gradio-mode> 88 window.__gradio_mode__ = "app"; 89 window.iFrameResizer = { 90 autoResize: false, 91 sizeWidth: false 92 }; 93 window.parent?.postMessage( 94 { type: "SET_SCROLLING", enabled: false }, 95 "*" 96 ); 97 </script>
97 98 <link rel="manifest" href="/manifest.json" /> 99
99<script type="module" crossorigin src="./assets/index-B5CnGmTK.js"></script>
99 100 <link rel="stylesheet" crossorigin href="./assets/index-bt_TDFDJ.css"> 101 </head> 102 103 <body 104 style=" 105 width: 100%; 106 margin: 0; 107 padding: 0; 108 display: flex; 109 flex-direction: column; 110 flex-grow: 1; 111 " 112 > 113 <gradio-app 114 control_page_title="true" 115 embed="false" 116 eager="true" 117 style="display: flex; flex-direction: column; flex-grow: 1" 118 > 119 </gradio-app> 120
120<script> 121 const ce = document.getElementsByTagName("gradio-app"); 122 123 if (ce[0]) { 124 ce[0].addEventListener("domchange", () => { 125 document.body.style.padding = "0"; 126 }); 127 document.body.style.padding = "0"; 128 } 129 </script>
129 130 </body> 131</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.