their original html structure for example:


"""

<html style="
		margin: 0;
		padding: 0;
		min-height: 100%;
		display: flex;
		flex-direction: column;
	" lang="en-US"><head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

		<style>
			:root {
				--bg: white;
				--col:   #1f2937;
				--bg-dark: #0b0f19;
				--col-dark: #f3f4f6;
			}


			body {
				background: var(--bg);
				color: var(--col);
				font-family: Arial, Helvetica, sans-serif;
			}

			@media (prefers-color-scheme: dark) {
				body {
					background: var(--bg-dark);
					color: var(--col-dark);
				}
			}
		</style>

		<meta property="og:url" content="https://gradio.app/">
		<meta property="og:type" content="website">
		<meta property="og:image" content="">
		<meta property="og:title" content="Gradio">
		<meta property="og:description" content="">
		<meta name="twitter:card" content="summary_large_image">
		<meta name="twitter:creator" content="@teamGradio">
		<meta name="twitter:title" content="Gradio">
		<meta name="twitter:description" content="">
		<meta name="twitter:image" content="">

		<script data-gradio-mode="">
			window.__gradio_mode__ = "app";
			window.iFrameResizer = {
				heightCalculationMethod: "taggedElement"
			};
			window.parent?.postMessage(
				{ type: "SET_SCROLLING", enabled: false },
				"*"
			);
		</script>

		<script>window.gradio_config = {"version":"4.44.0","mode":"blocks","app_id":14486992838203645223,"dev_mode":false,"analytics_enabled":true,"components":[{"id":1,"type":"html","props":{"value":"\u003ch1 align=\"center\"\u003eGPT-4o: Research Preview (Short-Term Availability)\u003c/h1\u003e","show_label":false,"visible":true,"elem_classes":[],"name":"html","_selectable":false},"skip_api":false,"component_class_id":"250f2d79d505ca0e6d62e7360ebf6bb5","key":null,"api_info":{"type":"string"},"example_inputs":"\u003cp\u003eHello\u003c/p\u003e"},{"id":2,"type":"html","props":{"value":"\u003ch3 align=\"center\" style=\"color: red;\"\u003eIf this app doesn\u0027t respond, consider trying our other GPT-4O app:\u003cbr/\u003e\u003ca href=\"https://huggingface.co/spaces/yuntian-deng/ChatGPT4Turbo\"\u003ehttps://huggingface.co/spaces/yuntian-deng/ChatGPT4Turbo\u003c/a\u003e\u003c/h3\u003e","show_label":false,"visible":true,"elem_classes":[],"name":"html","_selectable":false},"skip_api":false,"component_class_id":"250f2d79d505ca0e6d62e7360ebf6bb5","key":null,"api_info":{"type":"string"},"example_inputs":"\u003cp\u003eHello\u003c/p\u003e"},{"id":3,"type":"column","props":{"scale":1,"min_width":320,"variant":"default","visible":false,"elem_id":"col_container","show_progress":false,"name":"column"},"skip_api":true,"component_class_id":"214e3d6261b9edacc5d34ea4e8655821","key":null},{"id":4,"type":"chatbot","props":{"likeable":false,"value":[],"type":"tuples","show_label":true,"container":true,"min_width":160,"visible":true,"elem_id":"chatbot","elem_classes":[],"latex_delimiters":[{"left":"$$","right":"$$","display":true}],"rtl":false,"show_share_button":true,"show_copy_button":false,"avatar_images":[null,null],"sanitize_html":true,"render_markdown":true,"bubble_full_width":true,"line_breaks":true,"show_copy_all_button":false,"name":"chatbot","_selectable":false},"skip_api":false,"component_class_id":"f5586b71f64ccd6eb7f4bfd6c1e91abb","key":null,"api_info":{"$defs":{"ComponentMessage":{"properties":{"component":{"title":"Component","type":"string"},"value":{"title":"Value"},"constructor_args":{"title":"Constructor Args","type":"object"},"props":{"title":"Props","type":"object"}},"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":{"default":{"_type":"gradio.FileData"},"title":"Meta","type":"object"}},"required":["path"],"title":"FileData","type":"object"},"FileMessage":{"properties":{"file":{"$ref":"#/$defs/FileData"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Alt Text"}},"required":["file"],"title":"FileMessage","type":"object"}},"items":{"maxItems":2,"minItems":2,"prefixItems":[{"anyOf":[{"type":"string"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"},{"type":"null"}]},{"anyOf":[{"type":"string"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"},{"type":"null"}]}],"type":"array"},"title":"ChatbotDataTuples","type":"array"},"example_inputs":[["Hello!",null]]},{"id":5,"type":"textbox","props":{"lines":1,"max_lines":20,"placeholder":"Hi there!","label":"Type an input and press Enter","show_label":true,"container":true,"min_width":160,"visible":true,"autofocus":false,"autoscroll":true,"elem_classes":[],"type":"text","rtl":false,"show_copy_button":false,"name":"textbox","_selectable":false},"skip_api":false,"component_class_id":"d0491bb0fbd427bdb2a4549c4d1ac869","key":null,"api_info":{"type":"string"},"example_inputs":"Hello!!"},{"id":6,"type":"state","props":{"value":[],"time_to_live":null,"delete_callback":"\u003cfunction State.__init__.\u003clocals\u003e.\u003clambda\u003e at 0x7fd65c521990\u003e","name":"state","_selectable":false},"skip_api":true,"component_class_id":"52234f8c5f6f16893853acd5e503a8a8","key":null},{"id":7,"type":"row","props":{"variant":"default","visible":true,"equal_height":true,"show_progress":false,"name":"row"},"skip_api":true,"component_class_id":"b5cf3d15e2293fb5ccc071d7b8d69f64","key":null},{"id":8,"type":"column","props":{"scale":7,"min_width":320,"variant":"default","visible":true,"show_progress":false,"name":"column"},"skip_api":true,"component_class_id":"214e3d6261b9edacc5d34ea4e8655821","key":null},{"id":9,"type":"button","props":{"value":"Run","variant":"secondary","visible":true,"interactive":true,"elem_classes":[],"name":"button","_selectable":false},"skip_api":true,"component_class_id":"43ff9969f0bf4553b77ca8dc5b4850bc","key":null},{"id":10,"type":"column","props":{"scale":3,"min_width":320,"variant":"default","visible":true,"show_progress":false,"name":"column"},"skip_api":true,"component_class_id":"214e3d6261b9edacc5d34ea4e8655821","key":null},{"id":11,"type":"textbox","props":{"lines":1,"max_lines":20,"label":"Status code from OpenAI server","show_label":true,"container":true,"min_width":160,"visible":true,"autofocus":false,"autoscroll":true,"elem_classes":[],"type":"text","rtl":false,"show_copy_button":false,"name":"textbox","_selectable":false},"skip_api":false,"component_class_id":"d0491bb0fbd427bdb2a4549c4d1ac869","key":null,"api_info":{"type":"string"},"example_inputs":"Hello!!"},{"id":12,"type":"form","props":{"scale":0,"min_width":0,"name":"form"},"skip_api":true,"component_class_id":"43cda85c6ff7a5dd8f83d29496b014ee","key":null},{"id":13,"type":"accordion","props":{"label":"Parameters","open":false,"visible":true,"name":"accordion"},"skip_api":true,"component_class_id":"b49c1903c3591b866d0adab5a2f6e48b","key":null},{"id":14,"type":"slider","props":{"minimum":0,"maximum":1.0,"value":1.0,"step":0.05,"label":"Top-p (nucleus sampling)","show_label":true,"container":true,"min_width":160,"interactive":true,"visible":true,"elem_classes":[],"name":"slider","_selectable":false},"skip_api":false,"component_class_id":"1bc15a255bbbd15b85b58706accd599f","key":null,"api_info":{"type":"number","description":"numeric value between 0 and 1.0"},"example_inputs":0},{"id":15,"type":"slider","props":{"minimum":0,"maximum":5.0,"value":1.0,"step":0.1,"label":"Temperature","show_label":true,"container":true,"min_width":160,"interactive":true,"visible":true,"elem_classes":[],"name":"slider","_selectable":false},"skip_api":false,"component_class_id":"1bc15a255bbbd15b85b58706accd599f","key":null,"api_info":{"type":"number","description":"numeric value between 0 and 5.0"},"example_inputs":0},{"id":16,"type":"number","props":{"value":0,"show_label":true,"container":true,"min_width":160,"visible":false,"elem_classes":[],"precision":0,"step":1,"name":"number","_selectable":false},"skip_api":false,"component_class_id":"013e0bc782bafe4c933e4047ef3b7ba6","key":null,"api_info":{"type":"number"},"example_inputs":3},{"id":17,"type":"form","props":{"scale":0,"min_width":0,"name":"form"},"skip_api":true,"component_class_id":"43cda85c6ff7a5dd8f83d29496b014ee","key":null},{"id":18,"type":"form","props":{"scale":0,"min_width":0,"name":"form"},"skip_api":true,"component_class_id":"43cda85c6ff7a5dd8f83d29496b014ee","key":null},{"id":19,"type":"column","props":{"scale":1,"min_width":320,"variant":"default","visible":true,"elem_id":"user_consent_container","show_progress":false,"name":"column"},"skip_api":true,"component_class_id":"214e3d6261b9edacc5d34ea4e8655821","key":null},{"id":20,"type":"checkbox","props":{"value":false,"show_label":true,"container":true,"min_width":160,"visible":false,"elem_classes":[],"name":"checkbox","_selectable":false},"skip_api":false,"component_class_id":"b2c2c8b2ac4aa89c0f17edb93f9d0c1b","key":null,"api_info":{"type":"boolean"},"example_inputs":true},{"id":21,"type":"accordion","props":{"label":"User Consent for Data Collection, Use, and Sharing","open":true,"visible":true,"name":"accordion"},"skip_api":true,"component_class_id":"b49c1903c3591b866d0adab5a2f6e48b","key":null},{"id":22,"type":"html","props":{"value":"\n            \u003cdiv\u003e\n                \u003cp\u003eBy using our app, which is powered by OpenAI\u0027s API, you acknowledge and agree to the following terms regarding the data you provide:\u003c/p\u003e\n                \u003col\u003e\n                    \u003cli\u003e\u003cstrong\u003eCollection:\u003c/strong\u003e We may collect information, including the inputs you type into our app, the outputs generated by OpenAI\u0027s API, and certain technical details about your device and connection (such as browser type, operating system, and IP address) provided by your device\u0027s request headers.\u003c/li\u003e\n                    \u003cli\u003e\u003cstrong\u003eUse:\u003c/strong\u003e We may use the collected data for research purposes, to improve our services, and to develop new products or services, including commercial applications, and for security purposes, such as protecting against unauthorized access and attacks.\u003c/li\u003e\n                    \u003cli\u003e\u003cstrong\u003eSharing and Publication:\u003c/strong\u003e Your data, including the technical details collected from your device\u0027s request headers, may be published, shared with third parties, or used for analysis and reporting purposes.\u003c/li\u003e\n                    \u003cli\u003e\u003cstrong\u003eData Retention:\u003c/strong\u003e We may retain your data, including the technical details collected from your device\u0027s request headers, for as long as necessary.\u003c/li\u003e\n                \u003c/ol\u003e\n                \u003cp\u003eBy continuing to use our app, you provide your explicit consent to the collection, use, and potential sharing of your data as described above. If you do not agree with our data collection, use, and sharing practices, please do not use our app.\u003c/p\u003e\n            \u003c/div\u003e\n            ","show_label":false,"visible":true,"elem_classes":[],"name":"html","_selectable":false},"skip_api":false,"component_class_id":"250f2d79d505ca0e6d62e7360ebf6bb5","key":null,"api_info":{"type":"string"},"example_inputs":"\u003cp\u003eHello\u003c/p\u003e"},{"id":23,"type":"button","props":{"value":"I Agree","variant":"secondary","visible":true,"interactive":true,"elem_classes":[],"name":"button","_selectable":false},"skip_api":true,"component_class_id":"43ff9969f0bf4553b77ca8dc5b4850bc","key":null},{"id":24,"type":"form","props":{"scale":0,"min_width":0,"name":"form"},"skip_api":true,"component_class_id":"43cda85c6ff7a5dd8f83d29496b014ee","key":null}],"css":"#col_container { margin-left: auto; margin-right: auto;}\n                #chatbot {height: 520px; overflow: auto;}","connect_heartbeat":true,"js":null,"head":null,"title":"Gradio","space_id":"yuntian-deng/ChatGPT4","enable_queue":true,"show_error":false,"show_api":true,"is_colab":false,"max_file_size":null,"stylesheets":["https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600\u0026display=swap","https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600\u0026display=swap"],"theme":"default","protocol":"sse_v3","body_css":{"body_background_fill":"white","body_text_color":"#1f2937","body_background_fill_dark":"#0b0f19","body_text_color_dark":"#f3f4f6"},"fill_height":false,"fill_width":false,"theme_hash":"0d58f89b4c2aef0d338b84979b9ffb76d102d25035087d6771f50989d2612182","layout":{"id":0,"children":[{"id":1},{"id":2},{"id":3,"children":[{"id":4},{"id":18,"children":[{"id":5}]},{"id":6},{"id":7,"children":[{"id":8,"children":[{"id":9}]},{"id":10,"children":[{"id":12,"children":[{"id":11}]}]}]},{"id":13,"children":[{"id":17,"children":[{"id":14},{"id":15},{"id":16}]}]}]},{"id":19,"children":[{"id":24,"children":[{"id":20}]},{"id":21,"children":[{"id":22},{"id":23}]}]}]},"dependencies":[{"id":0,"targets":[[23,"click"]],"inputs":[],"outputs":[20],"backend_fn":false,"js":"(x) =\u003e confirm(\u0027By clicking \"OK\", I agree that my data may be published or shared.\u0027)","queue":false,"api_name":"js_fn","scroll_to_output":false,"show_progress":"full","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_mode":"once","show_api":false,"zerogpu":false,"rendered_in":null},{"id":1,"targets":[[20,"change"]],"inputs":[],"outputs":[19,3],"backend_fn":true,"js":null,"queue":false,"api_name":"enable_inputs","scroll_to_output":false,"show_progress":"full","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_mode":"always_last","show_api":true,"zerogpu":false,"rendered_in":null},{"id":2,"targets":[[5,"submit"]],"inputs":[],"outputs":[5,9],"backend_fn":true,"js":null,"queue":false,"api_name":"reset_textbox","scroll_to_output":false,"show_progress":"full","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_mode":"once","show_api":true,"zerogpu":false,"rendered_in":null},{"id":3,"targets":[[5,"submit"]],"inputs":[5,14,15,16,4,6],"outputs":[4,6,16,11,5,9],"backend_fn":true,"js":null,"queue":true,"api_name":"predict","scroll_to_output":false,"show_progress":"full","batch":false,"max_batch_size":4,"cancels":[],"types":{"generator":true,"cancel":false},"collects_event_data":false,"trigger_after":null,"trigger_only_on_success":false,"trigger_mode":"once","show_api":true,"zerogpu":false,"rendered_in":null},{"id":4,"targets":[[9,"click"]],"inputs":[],"outputs":[5,9],"backend_fn":true,"js":null,"queue":false,"api_name":"reset_textbox_1","scroll_to_output":false,"show_progress":"full","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_mode":"once","show_api":true,"zerogpu":false,"rendered_in":null},{"id":5,"targets":[[9,"click"]],"inputs":[5,14,15,16,4,6],"outputs":[4,6,16,11,5,9],"backend_fn":true,"js":null,"queue":true,"api_name":"predict_1","scroll_to_output":false,"show_progress":"full","batch":false,"max_batch_size":4,"cancels":[],"types":{"generator":true,"cancel":false},"collects_event_data":false,"trigger_after":null,"trigger_only_on_success":false,"trigger_mode":"once","show_api":true,"zerogpu":false,"rendered_in":null}],"root":"https://yuntian-deng-chatgpt4.hf.space","username":null};</script><script>window.gradio_api_info = {"named_endpoints":{"/enable_inputs":{"parameters":[],"returns":[],"show_api":true},"/reset_textbox":{"parameters":[],"returns":[{"label":"Type an input and press Enter","type":{"type":"string"},"python_type":{"type":"str","description":""},"component":"Textbox"}],"show_api":true},"/predict":{"parameters":[{"label":"Type an input and press Enter","parameter_name":"inputs","parameter_has_default":false,"parameter_default":null,"type":{"type":"string"},"python_type":{"type":"str","description":""},"component":"Textbox","example_input":"Hello!!"},{"label":"Top-p (nucleus sampling)","parameter_name":"top_p","parameter_has_default":true,"parameter_default":1.0,"type":{"type":"number","description":"numeric value between 0 and 1.0"},"python_type":{"type":"float","description":"numeric value between 0 and 1.0"},"component":"Slider","example_input":0},{"label":"Temperature","parameter_name":"temperature","parameter_has_default":true,"parameter_default":1.0,"type":{"type":"number","description":"numeric value between 0 and 5.0"},"python_type":{"type":"float","description":"numeric value between 0 and 5.0"},"component":"Slider","example_input":0},{"label":"parameter_16","parameter_name":"chat_counter","parameter_has_default":true,"parameter_default":0,"type":{"type":"number"},"python_type":{"type":"float","description":""},"component":"Number","example_input":3},{"label":"parameter_4","parameter_name":"chatbot","parameter_has_default":true,"parameter_default":[],"type":{"$defs":{"ComponentMessage":{"properties":{"component":{"title":"Component","type":"string"},"value":{"title":"Value"},"constructor_args":{"title":"Constructor Args","type":"object"},"props":{"title":"Props","type":"object"}},"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":{"default":{"_type":"gradio.FileData"},"title":"Meta","type":"object"}},"required":["path"],"title":"FileData","type":"object"},"FileMessage":{"properties":{"file":{"$ref":"#/$defs/FileData"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Alt Text"}},"required":["file"],"title":"FileMessage","type":"object"}},"items":{"maxItems":2,"minItems":2,"prefixItems":[{"anyOf":[{"type":"string"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"},{"type":"null"}]},{"anyOf":[{"type":"string"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"},{"type":"null"}]}],"type":"array"},"title":"ChatbotDataTuples","type":"array"},"python_type":{"type":"Tuple[str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None, str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None]","description":""},"component":"Chatbot","example_input":[["Hello!",null]]}],"returns":[{"label":"value_4","type":{"$defs":{"ComponentMessage":{"properties":{"component":{"title":"Component","type":"string"},"value":{"title":"Value"},"constructor_args":{"title":"Constructor Args","type":"object"},"props":{"title":"Props","type":"object"}},"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":{"default":{"_type":"gradio.FileData"},"title":"Meta","type":"object"}},"required":["path"],"title":"FileData","type":"object"},"FileMessage":{"properties":{"file":{"$ref":"#/$defs/FileData"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Alt Text"}},"required":["file"],"title":"FileMessage","type":"object"}},"items":{"maxItems":2,"minItems":2,"prefixItems":[{"anyOf":[{"type":"string"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"},{"type":"null"}]},{"anyOf":[{"type":"string"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"},{"type":"null"}]}],"type":"array"},"title":"ChatbotDataTuples","type":"array"},"python_type":{"type":"Tuple[str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None, str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None]","description":""},"component":"Chatbot"},{"label":"value_16","type":{"type":"number"},"python_type":{"type":"float","description":""},"component":"Number"},{"label":"Status code from OpenAI server","type":{"type":"string"},"python_type":{"type":"str","description":""},"component":"Textbox"},{"label":"Type an input and press Enter","type":{"type":"string"},"python_type":{"type":"str","description":""},"component":"Textbox"}],"show_api":true},"/reset_textbox_1":{"parameters":[],"returns":[{"label":"Type an input and press Enter","type":{"type":"string"},"python_type":{"type":"str","description":""},"component":"Textbox"}],"show_api":true},"/predict_1":{"parameters":[{"label":"Type an input and press Enter","parameter_name":"inputs","parameter_has_default":false,"parameter_default":null,"type":{"type":"string"},"python_type":{"type":"str","description":""},"component":"Textbox","example_input":"Hello!!"},{"label":"Top-p (nucleus sampling)","parameter_name":"top_p","parameter_has_default":true,"parameter_default":1.0,"type":{"type":"number","description":"numeric value between 0 and 1.0"},"python_type":{"type":"float","description":"numeric value between 0 and 1.0"},"component":"Slider","example_input":0},{"label":"Temperature","parameter_name":"temperature","parameter_has_default":true,"parameter_default":1.0,"type":{"type":"number","description":"numeric value between 0 and 5.0"},"python_type":{"type":"float","description":"numeric value between 0 and 5.0"},"component":"Slider","example_input":0},{"label":"parameter_16","parameter_name":"chat_counter","parameter_has_default":true,"parameter_default":0,"type":{"type":"number"},"python_type":{"type":"float","description":""},"component":"Number","example_input":3},{"label":"parameter_4","parameter_name":"chatbot","parameter_has_default":true,"parameter_default":[],"type":{"$defs":{"ComponentMessage":{"properties":{"component":{"title":"Component","type":"string"},"value":{"title":"Value"},"constructor_args":{"title":"Constructor Args","type":"object"},"props":{"title":"Props","type":"object"}},"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":{"default":{"_type":"gradio.FileData"},"title":"Meta","type":"object"}},"required":["path"],"title":"FileData","type":"object"},"FileMessage":{"properties":{"file":{"$ref":"#/$defs/FileData"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Alt Text"}},"required":["file"],"title":"FileMessage","type":"object"}},"items":{"maxItems":2,"minItems":2,"prefixItems":[{"anyOf":[{"type":"string"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"},{"type":"null"}]},{"anyOf":[{"type":"string"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"},{"type":"null"}]}],"type":"array"},"title":"ChatbotDataTuples","type":"array"},"python_type":{"type":"Tuple[str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None, str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None]","description":""},"component":"Chatbot","example_input":[["Hello!",null]]}],"returns":[{"label":"value_4","type":{"$defs":{"ComponentMessage":{"properties":{"component":{"title":"Component","type":"string"},"value":{"title":"Value"},"constructor_args":{"title":"Constructor Args","type":"object"},"props":{"title":"Props","type":"object"}},"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":{"default":{"_type":"gradio.FileData"},"title":"Meta","type":"object"}},"required":["path"],"title":"FileData","type":"object"},"FileMessage":{"properties":{"file":{"$ref":"#/$defs/FileData"},"alt_text":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Alt Text"}},"required":["file"],"title":"FileMessage","type":"object"}},"items":{"maxItems":2,"minItems":2,"prefixItems":[{"anyOf":[{"type":"string"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"},{"type":"null"}]},{"anyOf":[{"type":"string"},{"$ref":"#/$defs/FileMessage"},{"$ref":"#/$defs/ComponentMessage"},{"type":"null"}]}],"type":"array"},"title":"ChatbotDataTuples","type":"array"},"python_type":{"type":"Tuple[str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None, str | Dict(file: filepath, alt_text: str | None) | Dict(component: str, value: Any, constructor_args: Dict(), props: Dict()) | None]","description":""},"component":"Chatbot"},{"label":"value_16","type":{"type":"number"},"python_type":{"type":"float","description":""},"component":"Number"},{"label":"Status code from OpenAI server","type":{"type":"string"},"python_type":{"type":"str","description":""},"component":"Textbox"},{"label":"Type an input and press Enter","type":{"type":"string"},"python_type":{"type":"str","description":""},"component":"Textbox"}],"show_api":true}},"unnamed_endpoints":{}};</script>

		<link rel="preconnect" href="https://fonts.googleapis.com">
		<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
		<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.1/iframeResizer.contentWindow.min.js" async=""></script>
		<script type="module" crossorigin="" src="./assets/index-D5ROCp7B.js"></script>
		<link rel="stylesheet" crossorigin="" href="./assets/index-DuXXhepF.css" media="">
	<link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-D21IHG0c.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-BEyjvDG_.css" media=""><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/index-DuXXhepF.css" media=""><style>#col_container { margin-left: auto; margin-right: auto; } gradio-app .gradio-container.gradio-container-4-44-0 .contain  #col_container  { margin-left: auto; margin-right: auto; }#chatbot { height: 520px; overflow: auto; } gradio-app .gradio-container.gradio-container-4-44-0 .contain  #chatbot  { height: 520px; overflow: auto; }</style><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/theme.css?v=0d58f89b4c2aef0d338b84979b9ffb76d102d25035087d6771f50989d2612182" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Blocks-Dw_9NR1K.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/index-D5ROCp7B.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Button-uOcat6Z0.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Button-CTZL5Nos.css" media=""><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Blocks-yLdzXwzS.css" media=""><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&amp;display=swap" media=""><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&amp;display=swap" media=""><title>Gradio</title><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-QFLfeHqR.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Code-DGNrTu_I.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/BlockLabel-BXXlQleC.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-BicZ6NTU.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-3Ud1cpPD.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-CptIZeFZ.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-DDqzdfNS.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/index-CnqicUFC.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/ShareButton-OlciWAJu.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Image-DG8jX6JY.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/file-url-BIHPd7vS.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Image-B8dFOee4.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index.svelte_svelte_type_style_lang-D199jKmZ.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Check-CZUQOzJl.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Copy-B6RcHnoK.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Example.svelte_svelte_type_style_lang-qahm4PWk.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/prism-python-Bw3EYPE-.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Example-BOThR97Y.css" media=""><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-Xv8ZQETB.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/DownloadLink-BgAM71ly.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-D9RVvV4H.css" media=""><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/ImagePreview-DlqNSi_R.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-q5DoCKkE.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Textbox-CF9-08gf.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/BlockTitle-COFLSASJ.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Info-CMIMfBX8.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Textbox-D8IAzrZj.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Example-C7XUkkid.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Example-Cj3ii62O.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-CwNLzWTz.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-C43SQM_O.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-DwSO5GE1.js"><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-DDCF2BFd.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-B0JJ6p9c.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-BpBoLkq9.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-C5NYahSl.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-CWcDktiU.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-CJeiS5ET.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-Ix1HTuFr.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-BUublr_b.css" media=""><link rel="modulepreload" as="script" crossorigin="" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-CzlZdV35.js"><link rel="stylesheet" href="https://yuntian-deng-chatgpt4.hf.space/assets/Index-BTCbxfal.css" media=""></head>

	<body style="width: 100%; margin: 0px; padding: 0px; display: flex; flex-direction: column; flex-grow: 1; --chatbot-body-text-size: 16px;" class="dark">
		<gradio-app control_page_title="true" embed="false" eager="true" style="display: flex; flex-direction: column; flex-grow: 1; background: var(--body-background-fill);">
		<div class="gradio-container gradio-container-4-44-0 svelte-wpkpf6 app" data-iframe-height="" style="min-height: initial; flex-grow: 1;"><div class="main svelte-wpkpf6">  <div class="wrap svelte-1rjryqp" style="min-height: 100%;"><div class="contain svelte-1rjryqp" style="flex-grow: 1;"><div id="component-0" class="svelte-vt1mxs gap" style="min-width: min(0px, 100%);"> <div id="component-1" class="block svelte-12cmxck padded hide-container" style="border-style: solid; overflow: visible; min-width: min(0px, 100%); border-width: var(--block-border-width);"> <div class="wrap center full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div> <div class="svelte-uqf9ro"><div class="prose  svelte-1ybaih5"><h1 align="center">GPT-4o: Research Preview (Short-Term Availability)</h1></div></div></div><div id="component-2" class="block svelte-12cmxck padded hide-container" style="border-style: solid; overflow: visible; min-width: min(0px, 100%); border-width: var(--block-border-width);"> <div class="wrap center full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div> <div class="svelte-uqf9ro"><div class="prose  svelte-1ybaih5"><h3 style="color: red;" align="center">If this app doesn't respond, consider trying our other GPT-4O app:<br><a href="https://huggingface.co/spaces/yuntian-deng/ChatGPT4Turbo" target="_blank">https://huggingface.co/spaces/yuntian-deng/ChatGPT4Turbo</a></h3></div></div></div><div id="col_container" class="svelte-vt1mxs gap" style="flex-grow: 1; min-width: min(320px, 100%);"> <div id="chatbot" class="block  svelte-12cmxck" style="height: 400px; border-style: solid; overflow: hidden; min-width: min(160px, 100%); border-width: var(--block-border-width);"><div class="wrap default minimal svelte-au1olv translucent hide" style="position: absolute; padding: 0px;"></div> <div class="wrapper svelte-nab2ao"><label for="" data-testid="block-label" class="svelte-1b6s6s float"><span class="svelte-1b6s6s"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--carbon" width="100%" height="100%" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M17.74 30L16 29l4-7h6a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h9v2H6a4 4 0 0 1-4-4V8a4 4 0 0 1 4-4h20a4 4 0 0 1 4 4v12a4 4 0 0 1-4 4h-4.84Z"></path><path fill="currentColor" d="M8 10h16v2H8zm0 6h10v2H8z"></path></svg></span> Chatbot</label> <div class="share-button svelte-1e1jlin"><button aria-label="Share" aria-haspopup="false" title="Share" class="svelte-rk35yg padded" style="color: var(--block-label-text-color); --bg-color: var(--background-fill-primary); margin-left: 0px;"> <div class="svelte-rk35yg small"><svg id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M23,20a5,5,0,0,0-3.89,1.89L11.8,17.32a4.46,4.46,0,0,0,0-2.64l7.31-4.57A5,5,0,1,0,18,7a4.79,4.79,0,0,0,.2,1.32l-7.31,4.57a5,5,0,1,0,0,6.22l7.31,4.57A4.79,4.79,0,0,0,18,25a5,5,0,1,0,5-5ZM23,4a3,3,0,1,1-3,3A3,3,0,0,1,23,4ZM7,19a3,3,0,1,1,3-3A3,3,0,0,1,7,19Zm16,9a3,3,0,1,1,3-3A3,3,0,0,1,23,28Z" fill="currentColor"></path></svg></div></button></div>  <div class="bubble-wrap svelte-1e1jlin" role="log" aria-label="chatbot conversation" aria-live="polite"><div class="message-wrap svelte-1e1jlin"> <div class="message-row bubble user-row svelte-1e1jlin"> <div class="flex-wrap user svelte-1e1jlin"><div class="message user svelte-1e1jlin panel-full-width" style="text-align: right;"><button data-testid="user" dir="ltr" aria-label="user's message: tstmsg" class="svelte-1e1jlin" style="user-select: text; cursor: default; text-align: left;"><span class="md svelte-8tpqd2 chatbot prose"><p>tstmsg</p>
</span></button> </div></div></div>  <div class="message-row bubble bot-row svelte-1e1jlin"> <div class="flex-wrap bot svelte-1e1jlin"><div class="message bot svelte-1e1jlin panel-full-width" style="text-align: right;"><button data-testid="bot" dir="ltr" aria-label="bot's message: It looks like you entered &quot;tstmsg,&quot; which seems like a test message. If you have any questions or need assistance, feel free to let me know how I can help!" class="svelte-1e1jlin" style="user-select: text; cursor: default; text-align: left;"><span class="md svelte-8tpqd2 chatbot prose"><p>It looks like you entered "tstmsg," which seems like a test message. If you have any questions or need assistance, feel free to let me know how I can help!</p>
</span></button> </div></div></div>  <div class="message-row bubble user-row svelte-1e1jlin"> <div class="flex-wrap user svelte-1e1jlin"><div class="message user svelte-1e1jlin panel-full-width" style="text-align: right;"><button data-testid="user" dir="ltr" aria-label="user's message: tstmsg" class="svelte-1e1jlin" style="user-select: text; cursor: default; text-align: left;"><span class="md svelte-8tpqd2 chatbot prose"><p>tstmsg</p>
</span></button> </div></div></div>  <div class="message-row bubble bot-row svelte-1e1jlin"> <div class="flex-wrap bot svelte-1e1jlin"><div class="message bot svelte-1e1jlin panel-full-width" style="text-align: right;"><button data-testid="bot" dir="ltr" aria-label="bot's message: Got it! If you're testing the system, everything seems to be working fine. If there's anything specific you need help with or if you have any questions, just let me know!" class="svelte-1e1jlin" style="user-select: text; cursor: default; text-align: left;"><span class="md svelte-8tpqd2 chatbot prose"><p>Got it! If you're testing the system, everything seems to be working fine. If there's anything specific you need help with or if you have any questions, just let me know!</p>
</span></button> </div></div></div>  <div class="message-row bubble user-row svelte-1e1jlin"> <div class="flex-wrap user svelte-1e1jlin"><div class="message user svelte-1e1jlin panel-full-width" style="text-align: right;"><button data-testid="user" dir="ltr" aria-label="user's message: tstmsg" class="svelte-1e1jlin" style="user-select: text; cursor: default; text-align: left;"><span class="md svelte-8tpqd2 chatbot prose"><p>tstmsg</p>
</span></button> </div></div></div>  <div class="message-row bubble bot-row svelte-1e1jlin"> <div class="flex-wrap bot svelte-1e1jlin"><div class="message bot svelte-1e1jlin panel-full-width" style="text-align: right;"><button data-testid="bot" dir="ltr" aria-label="bot's message: Understood. If you need assistance with something specific or are just testing the response, feel free to ask anything. I'm here to help!" class="svelte-1e1jlin latest" style="user-select: text; cursor: default; text-align: left;"><span class="md svelte-8tpqd2 chatbot prose"><p>Understood. If you need assistance with something specific or are just testing the response, feel free to ask anything. I'm here to help!</p>
</span></button> </div></div></div>  </div></div></div></div><div class="form svelte-sfqy0y" style="flex-grow: 0; min-width: min(0px, 100%);"><div id="component-5" class="block svelte-12cmxck padded" style="border-style: solid; overflow: hidden; min-width: min(160px, 100%); border-width: var(--block-border-width);"><div class="wrap default full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div> <label class="svelte-1f354aw container"><span data-testid="block-info" class="svelte-1gfkn6j">Type an input and press Enter</span>   <textarea data-testid="textbox" class="scroll-hide svelte-1f354aw" dir="ltr" placeholder="Hi there!" rows="1" style="overflow-y: scroll; height: 43px;"></textarea></label></div></div><div id="component-7" class="svelte-sa48pu stretch"> <div id="component-8" class="svelte-vt1mxs gap" style="flex-grow: 7; min-width: min(320px, 100%);"> <button class="lg secondary  svelte-cmf5ev" id="component-9"> Run</button></div><div id="component-10" class="svelte-vt1mxs gap" style="flex-grow: 3; min-width: min(320px, 100%);"> <div class="form svelte-sfqy0y" style="flex-grow: 0; min-width: min(0px, 100%);"><div id="component-11" class="block svelte-12cmxck padded" style="border-style: solid; overflow: hidden; min-width: min(160px, 100%); border-width: var(--block-border-width);"><div class="wrap default full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div> <label class="svelte-1f354aw container"><span data-testid="block-info" class="svelte-1gfkn6j">Status code from OpenAI server</span>   <textarea data-testid="textbox" class="scroll-hide svelte-1f354aw" dir="ltr" placeholder="" rows="1" disabled="" style="overflow-y: scroll; height: 43px;"></textarea></label></div></div></div></div><div id="component-13" class="block svelte-12cmxck padded" style="border-style: solid; overflow: visible; min-width: min(0px, 100%); border-width: var(--block-border-width);"><div class="wrap default full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div> <button class="label-wrap svelte-1w6vloh"><span class="svelte-1w6vloh">Parameters</span> <span class="icon svelte-1w6vloh" style="transform: rotate(90deg);">▼</span></button> <div style="display: none;"><div id="" class="svelte-vt1mxs gap" style="min-width: min(0px, 100%);"> <div class="form svelte-sfqy0y" style="flex-grow: 0; min-width: min(0px, 100%);"><div id="component-14" class="block svelte-12cmxck padded" style="border-style: solid; overflow: visible; min-width: min(160px, 100%); border-width: var(--block-border-width);"><div class="wrap default full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div> <div class="wrap svelte-pc1gm4"><div class="head svelte-pc1gm4"><label for="range_id_0"><span data-testid="block-info" class="svelte-1gfkn6j">Top-p (nucleus sampling)</span> </label> <input aria-label="number input for Top-p (nucleus sampling)" data-testid="number-input" type="number" min="0" max="1" step="0.05" class="svelte-pc1gm4"></div></div> <input type="range" id="range_id_0" name="cowbell" min="0" max="1" step="0.05" aria-label="range slider for Top-p (nucleus sampling)" class="svelte-pc1gm4" style="background-size: 100% 100%;"></div><div id="component-15" class="block svelte-12cmxck padded" style="border-style: solid; overflow: visible; min-width: min(160px, 100%); border-width: var(--block-border-width);"><div class="wrap default full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div> <div class="wrap svelte-pc1gm4"><div class="head svelte-pc1gm4"><label for="range_id_1"><span data-testid="block-info" class="svelte-1gfkn6j">Temperature</span> </label> <input aria-label="number input for Temperature" data-testid="number-input" type="number" min="0" max="5" step="0.1" class="svelte-pc1gm4"></div></div> <input type="range" id="range_id_1" name="cowbell" min="0" max="5" step="0.1" aria-label="range slider for Temperature" class="svelte-pc1gm4" style="background-size: 20% 100%;"></div><div id="component-16" class="block svelte-12cmxck hidden padded" style="border-style: solid; overflow: hidden; min-width: min(160px, 100%); border-width: var(--block-border-width);"><div class="wrap default full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div> <label class="block svelte-pjtc3 container"><span data-testid="block-info" class="svelte-1gfkn6j">Number</span>  <input aria-label="Number" type="number" step="1" class="svelte-pjtc3"></label></div></div></div></div></div></div><div id="user_consent_container" class="svelte-vt1mxs gap hide" style="flex-grow: 1; min-width: min(320px, 100%);"> <div class="form svelte-sfqy0y hidden" style="flex-grow: 0; min-width: min(0px, 100%);"><div id="component-20" class="block svelte-12cmxck hidden padded" style="border-style: solid; overflow: visible; min-width: min(160px, 100%); border-width: var(--block-border-width);"><div class="wrap default full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div>  <label class="svelte-3pzdsv disabled"><input disabled="" type="checkbox" name="test" data-testid="checkbox" class="svelte-3pzdsv"> <span class="ml-2 svelte-3pzdsv">Checkbox</span></label></div></div><div id="component-21" class="block svelte-12cmxck padded" style="border-style: solid; overflow: visible; min-width: min(0px, 100%); border-width: var(--block-border-width);"><div class="wrap default full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div> <button class="label-wrap svelte-1w6vloh open"><span class="svelte-1w6vloh">User Consent for Data Collection, Use, and Sharing</span> <span class="icon svelte-1w6vloh" style="transform: rotate(0deg);">▼</span></button> <div style="display: block;"><div id="" class="svelte-vt1mxs gap" style="min-width: min(0px, 100%);"> <div id="component-22" class="block svelte-12cmxck padded hide-container" style="border-style: solid; overflow: visible; min-width: min(0px, 100%); border-width: var(--block-border-width);"> <div class="wrap center full svelte-au1olv hide" style="position: absolute; padding: 0px;"></div> <div class="svelte-uqf9ro"><div class="prose  svelte-1ybaih5">
            <div>
                <p>By using our app, which is powered by OpenAI's API, you acknowledge and agree to the following terms regarding the data you provide:</p>
                <ol>
                    <li><strong>Collection:</strong> We may collect information, including the inputs you type into our app, the outputs generated by OpenAI's API, and certain technical details about your device and connection (such as browser type, operating system, and IP address) provided by your device's request headers.</li>
                    <li><strong>Use:</strong> We may use the collected data for research purposes, to improve our services, and to develop new products or services, including commercial applications, and for security purposes, such as protecting against unauthorized access and attacks.</li>
                    <li><strong>Sharing and Publication:</strong> Your data, including the technical details collected from your device's request headers, may be published, shared with third parties, or used for analysis and reporting purposes.</li>
                    <li><strong>Data Retention:</strong> We may retain your data, including the technical details collected from your device's request headers, for as long as necessary.</li>
                </ol>
                <p>By continuing to use our app, you provide your explicit consent to the collection, use, and potential sharing of your data as described above. If you do not agree with our data collection, use, and sharing practices, please do not use our app.</p>
            </div>
            </div></div></div><button class="lg secondary  svelte-cmf5ev" id="component-23"> I Agree</button></div></div></div></div></div></div> <footer class="svelte-1rjryqp"><button class="show-api svelte-1rjryqp">Use via API <img src="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M26.9425%202.94265C27.4632%202.42195%2027.4632%201.57773%2026.9425%201.05703C26.4218%200.536329%2025.5776%200.536329%2025.0569%201.05703L22.5713%203.54256C21.1213%202.59333%2019.5367%202.43378%2018.1753%202.64006C16.5495%202.88638%2015.1127%203.66838%2014.3905%204.39053L12.3905%206.39053C12.1405%206.64058%2012%206.97972%2012%207.33334C12%207.68697%2012.1405%208.0261%2012.3905%208.27615L19.7239%2015.6095C20.2446%2016.1302%2021.0888%2016.1302%2021.6095%2015.6095L23.6095%2013.6095C24.3316%2012.8873%2025.1136%2011.4505%2025.36%209.82475C25.5663%208.46312%2025.4066%206.87827%2024.4571%205.42807L26.9425%202.94265Z'%20fill='%233c4555'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.276%2012.9426C12.7967%2012.4219%2012.7967%2011.5777%2012.276%2011.057C11.7553%2010.5363%2010.9111%2010.5363%2010.3904%2011.057L8.66651%2012.7809L8.27615%2012.3905C8.0261%2012.1405%207.68697%2012%207.33334%2012C6.97972%2012%206.64058%2012.1405%206.39053%2012.3905L4.39053%2014.3905C3.66838%2015.1127%202.88638%2016.5495%202.64006%2018.1753C2.43377%2019.5367%202.59333%2021.1214%203.54262%2022.5714L1.05703%2025.057C0.536329%2025.5777%200.536329%2026.4219%201.05703%2026.9426C1.57773%2027.4633%202.42195%2027.4633%202.94265%2026.9426L5.42817%2024.4571C6.87835%2025.4066%208.46315%2025.5663%209.82475%2025.36C11.4505%2025.1136%2012.8873%2024.3316%2013.6095%2023.6095L15.6095%2021.6095C16.1302%2021.0888%2016.1302%2020.2446%2015.6095%2019.7239L15.2188%2019.3332L16.9426%2017.6093C17.4633%2017.0886%2017.4633%2016.2444%2016.9426%2015.7237C16.4219%2015.203%2015.5777%2015.203%2015.057%2015.7237L13.3332%2017.4475L10.5521%2014.6665L12.276%2012.9426Z'%20fill='%23FF7C00'/%3e%3c/svg%3e" alt="logo" class="svelte-1rjryqp"></button> <div class="svelte-1rjryqp">·</div> <a href="https://gradio.app" class="built-with svelte-1rjryqp" target="_blank" rel="noreferrer">Built with Gradio <img src="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='576'%20height='576'%20viewBox='0%200%20576%20576'%20fill='none'%3e%3cpath%20d='M287.5%20229L86%20344.5L287.5%20460L489%20344.5L287.5%20229Z'%20stroke='url(%23paint0_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='round'/%3e%3cpath%20d='M287.5%20116L86%20231.5L287.5%20347L489%20231.5L287.5%20116Z'%20stroke='url(%23paint1_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='round'/%3e%3cpath%20d='M86%20344L288%20229'%20stroke='url(%23paint2_linear_102_7)'%20stroke-width='59'%20stroke-linejoin='bevel'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_102_7'%20x1='60'%20y1='341'%20x2='429.5'%20y2='344'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_102_7'%20x1='513.5'%20y1='231'%20x2='143.5'%20y2='231'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_102_7'%20x1='60'%20y1='344'%20x2='428.987'%20y2='341.811'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23F9D100'/%3e%3cstop%20offset='1'%20stop-color='%23F97700'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e" alt="logo" class="svelte-1rjryqp"></a></footer></div>   <div class="toast-wrap svelte-pu0yf1"></div></div> </div></gradio-app>
		<script>
			const ce = document.getElementsByTagName("gradio-app");

			if (ce[0]) {
				ce[0].addEventListener("domchange", () => {
					document.body.style.padding = "0";
				});
				document.body.style.padding = "0";
			}
		</script>
	
</body></html>

""".


userscript in which need to place "Run" button above input at very most top, then input-textarea, then messages container in one column and everytning fitted at full width:


"""

// ==UserScript==
// @name         Enhanced Chatbot with Stripped Styles
// @version      1.1
// @description  Remove all existing styles and apply custom styles, with context management to the chatbot interface.
// @match        *://yuntian-deng-chatgpt4.hf.space/*
// @grant        none
// @require      https://cdn.jsdelivr.net/npm/jszip@3.10.1/dist/jszip.min.js
// ==/UserScript==

(function () {
    'use strict';

    /* global JSZip */
    let chatHistory = []; // Array to store chat messages
    let previousLength = 0;
    let manualSaveTriggered = false;
    let stabilityTimer; // Initialize the stabilityTimer variable
    const STABILITY_DELAY = 3000; // 3 seconds

    const customStyles = `
        * {
            border: none !important;
            box-shadow: none !important;
            scrollbar-color: #f00 #333 !important;
            border-radius: 0 !important;
        }
        .bubble-wrap.svelte-1e1jlin {
            background: linear-gradient(to right, #111 0%, #333 50%, #111 100%) !important;
        }
        #user_consent_container, .svelte-1b6s6s, .share-button, .svelte-1gfkn6j {
            display: none !important;
        }
        body {
            font-family: monospace !important;
            width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            display: flex !important;
            flex-direction: column !important;
            flex-grow: 1 !important;
            color: #fff !important;
            font-size: 18px !important;
            font-weight: normal !important;
            --chatbot-body-text-size: 18px !important;
            background-color: black !important;
            height: 70vh !important;
overflow-y: hidden;
        }
        gradio-app {
            display: flex !important;
            flex-direction: column !important;
            flex-grow: 1 !important;
        }
        #col_container,
        #chatbot,
        .gradio-container,
        .main,
        .wrap,
        .contain,
        .block {
            background: none !important;
            color: #fff !important;
            font-size: 18px !important;
            margin: 0 !important;
            padding: 0 !important;
            font-weight: normal !important;
            border: none !important;
            box-shadow: none !important;
            max-width: 100% !important;
            border-style: none !important;
        }
        h1, h2, h3, p, span, div {
            color: #fff !important;
            margin: 0 !important;
            padding: 0 !important;
            font-weight: normal !important;
        }
        h1 {
            color: #8cf !important;
        }
        h3 {
            color: #9f9 !important;
        }
        #component-2 h3 {
            color: #f63 !important;
        }
        input {
            background: linear-gradient(to right, #555 0%, #777 50%, #555 100%) !important;
            color: #fff !important;
            border: none !important;
            box-shadow: none !important;
            width: 100%;
            height: auto !important;
            max-height: 50vh !important;
            resize: none !important;
            overflow: auto !important;
        }
        footer, .built-with, #component-13, .svelte-1eq475l {
            display: none !important;
        }
        #col_container {
            padding: 0 !important;
            display: grid !important;
            grid-template-rows: auto 1fr !important;
            grid-template-columns: 1fr auto !important;
        }
        #chatbot {
            padding: 0 !important;
            color: #fff !important;
            border: none !important;
            box-shadow: none !important;
            border-style: none !important;
            flex-grow: 1 !important;
            width: 100% !important;
            height: calc(95vh - 10px) !important;
            display: flex !important;
            flex-direction: column-reverse !important;
            grid-row: 2 / 3 !important;
            grid-column: span 2 !important;
        }
        #chatbot .message {
            margin: 5px 0 !important;
            padding: 10px !important;
            color: #fff !important;
            border: 1px solid #444 !important;
            box-shadow: none !important;
            border-radius: 0 !important;
        }
        #chatbot .user {
            font-size: 18px !important;
            background: rgba(255, 165, 0, 0.1) !important;
        }
        #chatbot .bot {
            font-size: 18px !important;
            background: rgba(0, 191, 255, 0.1) !important;
        }
        #component-5, .form {
            grid-row: 1 / 2 !important;
            grid-column: 1 / 2 !important;
            height: auto !important;
        }

        .message-row.user-row.svelte-1e1jlin.svelte-1e1jlin.svelte-1e1jlin {
            align-self: self-start !important;
        }
        .svelte-1jsbsph, .svelte-1eq475l {
            display: none !important;
        }
        textarea {
            font-size: 18px !important;
            margin: 0 !important;
            max-height: 50vh !important;
        }
        #form-input {
            border: 1px solid #444 !important;
            grid-row: 1 / 2 !important;
            grid-column: 1 / 2 !important;
            top: 0 !important;
            left: 0 !important;
            width: 100% !important;
            max-height: 50vh !important;
            resize: vertical !important;
        }
        #component-7 {
            gap: 0 !important;
            grid-row: 1 / 2 !important;
            grid-column: 2 / 3 !important;
            display: flex !important;
            flex-shrink: 0 !important;
            overflow: hidden !important;
            flex-grow: 0 !important;
            width: 20vw !important;
            height: auto !important;
        }
        #component-10 {
            display: none;
        }
        .block.svelte-1scc9gv {
            border: 1px solid #444 !important;
        }
        #component-1,
        #component-2 {
            display: none !important;
        }
    `;

    function removeExistingStyles() {
        const styleTags = document.querySelectorAll('style, link[rel="stylesheet"]');
        styleTags.forEach(tag => tag.parentNode.removeChild(tag));
    }

    function injectCustomStyles() {
        const styleElement = document.createElement('style');
        styleElement.textContent = customStyles;
        document.head.appendChild(styleElement);
    }

    function saveChatHistory(prefix = 'chat_history') {
        if (typeof JSZip !== 'undefined' && chatHistory.length > 0) {
            const zip = new JSZip();
            zip.file(`${prefix}.txt`, chatHistory.join('\n'));
            zip.generateAsync({ type: 'blob' })
                .then(content => {
                    const blobURL = URL.createObjectURL(content);
                    const timestamp = getTimestamp();

                    const a = document.createElement('a');
                    a.href = blobURL;
                    a.download = `${prefix}_${timestamp}.zip`;
                    a.style.display = 'none';
                    document.body.appendChild(a);
                    a.click();
                    document.body.removeChild(a);
                })
                .catch(err => console.error('ZIP generation error:', err));
        }
    }

    function getTimestamp() {
        const now = new Date();
        return `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}_${String(now.getHours()).padStart(2, '0')}-${String(now.getMinutes()).padStart(2, '0')}-${String(now.getSeconds()).padStart(2, '0')}`;
    }

    function shortcutDetection(event) {
        const inputBox = event.target;
        if (inputBox.value.trim().toLowerCase() === 's') {
            shortcutCompletion(inputBox);
        }
    }

    function shortcutCompletion(inputBox) {
        clearTimeout(stabilityTimer);
        stabilityTimer = setTimeout(() => {
            const command = inputBox.value.trim().toLowerCase();
            if (command === 'sve') {
                manualSaveTriggered = true;
                saveChatHistory('manual_save');
                inputBox.value = ''; // Clear the input after processing the command
            } else if (command === 'svr') {
                const context = chatHistory.join('\n');
                alert("Copy the following context manually:\n" + context);
                inputBox.value = ''; // Clear after handling "svr"
            }
        }, STABILITY_DELAY);
    }

    function startListeningForInitialS(inputBox) {
        inputBox.addEventListener('input', shortcutDetection);
    }

    function logAllMessages() {
        const messageWrap = document.querySelector('.bubble-wrap.svelte-1e1jlin');
        if (!messageWrap) return;

        const messages = Array.from(messageWrap.children).map(div => div.textContent.trim());
        if (previousLength === 0 && messages.length > 0) {
            console.log("Fresh chat detected.");
            chatHistory.length = 0; // Clear history if new chat session
        }

        const currentLength = messages.length;
        chatHistory = messages;
        previousLength = currentLength;
        manualSaveTriggered = false;
    }

    function convertButtonOnSelect(event) {
        const selectedText = window.getSelection().toString();
        if (selectedText.length > 0) {
            const targetButton = event.target.closest('button');
            if (targetButton) {
                const div = document.createElement('div');
                Array.from(targetButton.attributes).forEach(attr => {
                    div.setAttribute(attr.name, attr.value);
                });
                div.innerHTML = targetButton.innerHTML;
                div.style.cssText = targetButton.style.cssText;
                targetButton.parentNode.replaceChild(div, targetButton);
            }
        }
    }

    function startObserving() {
        const messageWrap = document.querySelector('.bubble-wrap.svelte-1e1jlin');
        const inputBox = document.querySelector('textarea[data-testid="textbox"]');

        if (messageWrap) {
            const observer = new MutationObserver(logAllMessages);
            observer.observe(messageWrap, { childList: true, subtree: true });
        }

        if (inputBox) {
            startListeningForInitialS(inputBox);
        } else {
            setTimeout(startObserving, 1000);
        }

        document.addEventListener('mouseup', convertButtonOnSelect);
    }

    function triggerDummyRequest() {
        const img = document.createElement('img');
        img.src = 'https://cdn.jsdelivr.net/some-non-existent-file-to-trigger-noscript.png';
        img.style.display = 'none';
        document.body.appendChild(img);
    }

    window.addEventListener('load', () => {
        removeExistingStyles();
        injectCustomStyles();
        triggerDummyRequest();
        startObserving();
    });

})();

""".