@YarNer

Как подключить файлы и вывести картинку?

Это программа с интерфейсом на python, html, js, jQuery, писал по уроку Хауди Хо, на 6:49 заметил что файлы не соеденены, и даже не вызывается окно. Помогите пожалуйста. Ролик Хауди Хо : https://www.youtube.com/watch?v=Gon0MvppfF8&t=409s

HTML

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>Дарова</title>

	<style type="text/css">
		body{
			background: #00d2ff;
		}


		#location {
			display: block;
			border: none;
			background: rgba(255, 255, 255, .5);
			border-radius: 10px;
			padding: 20px;
			color: white;
			outline: none;
			width: 100%;
			font-size: 30px;
		}

		#location::placeholder {
			color: rgba(255, 255, 255, .5);
		}

		#show{
			text-decoration:none; 
			margin-top: 50px; 
			 padding-top:15px; 
			 padding-bottom: 15px;
			 width: 100%;
			 border:groove 1px #252525; 
			 -webkit-border-radius:4px;
			 -moz-border-radius:4px; 
			 border-radius: 4px; 
			 font:20px Verdana, Geneva, sans-serif; 
			 font-weight:bold; 
			 color:#141414; 
			 background-color:#ddecdf; 
			 cursor:pointer;
		}
	</style>


	<script src="eel.js"></script>
	<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
</head>
<body>
	
	<input id="location" type="text" placeholder="Введите название страны и города ..." required="" value="Нью-Йорк, США">

	<button id="show">Узнать погоду</button>

	<div class="info">
		
	</div>

	<script type="text/javascript">
		


		async function display_weather() {
			let place = document.getElementBy('location').value;

			let res = await eel.get_weather(place)();
			document.getElementById('info').innerHTML = res;
		}

		jQuery('#show').on('click', function(){
			display_weather();
		});


	</script>

</body>
</html>


import eel
import pyowm

owm = pyowm.OWM("586eb7f9a57d72046bcebd873e656736")

@eel.expose
def get_weather(place):
	city = place
	mgr = owm.weather_manager()

	observation = mgr.weather_at_place(city)
	w = observation.weather

	temp = w.temperature('celsius')['temp']

	return "В городе " + city + " сейчас " + str(temp) + " градусов!"



# eel.init("web")

# eel.start("index.html" , size=(700, 700))
  • Вопрос задан
  • 72 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы