每当我在python中使用<?php
$success = false;
if($_POST["submit"]) {
$orderBy =$_POST['dateTime'];
$recipient="contact@ricktology.com";
$subject="Form to email message";
$sender=$_POST["FNAME"];
$senderEmail=$_POST["EMAIL"];
$message=$_POST["ORDER"];
$mailBody="Name: $sender \nEmail: $senderEmail \n\n$orderBy \n $message";
mail($recipient, $subject, $mailBody, "From: $sender <$senderEmail>");
$success = true;
if( $success && $success)
echo "<script type='text/javascript'>alert('An Email has been sent to the Roccos Team!')</script>";
else
echo "<script type='text/javascript'>alert('An error occured! Please try again.')</script>";
}
?>
时,尝试在本地运行某些ml模型时,都会收到此错误。我正在将Windows与/* main process function */
function process(file) {
var reader = new FileReader();
reader.onload = function(event) {
var dataUri = event.target.result;
var img = new Image();
//load image and drop into canvas
img.onload = function() {
//a custom fade in and out slideshow
context.clearRect(0,0,context.canvas.width,context.canvas.height);
context.globalAlpha = 0.2;
context.drawImage(img, 0, 0, canvas.width, canvas.height);
video.add(context);
context.clearRect(0,0,context.canvas.width,context.canvas.height);
context.globalAlpha = 0.4;
context.drawImage(img, 0, 0, canvas.width, canvas.height);
video.add(context);
context.clearRect(0,0,context.canvas.width,context.canvas.height);
context.globalAlpha = 0.6;
context.drawImage(img, 0, 0, canvas.width, canvas.height);
video.add(context);
context.clearRect(0,0,context.canvas.width,context.canvas.height);
context.globalAlpha = 0.8;
context.drawImage(img, 0, 0, canvas.width, canvas.height);
video.add(context);
context.clearRect(0,0,context.canvas.width,context.canvas.height);
context.drawImage(img, 0, 0, canvas.width, canvas.height);
context.globalAlpha = 1;
video.add(context);
//this should be a loop based on some user input
video.add(context);
video.add(context);
video.add(context);
video.add(context);
video.add(context);
video.add(context);
context.clearRect(0,0,context.canvas.width,context.canvas.height);
context.globalAlpha = 0.8;
context.drawImage(img, 0, 0, canvas.width, canvas.height);
video.add(context);
context.clearRect(0,0,context.canvas.width,context.canvas.height);
context.globalAlpha = 0.6;
context.drawImage(img, 0, 0, canvas.width, canvas.height);
video.add(context);
context.clearRect(0,0,context.canvas.width,context.canvas.height);
context.globalAlpha = 0.4;
context.drawImage(img, 0, 0, canvas.width, canvas.height);
video.add(context);
ctx++;
finalizeVideo();
};
img.src = dataUri;
};
}
一起使用。这是错误:
import keras
答案 0 :(得分:0)
尝试一下:
从tensorflow.python导入keras