My Flame sensor code not working

My Code

int fire=7;
int alarm=8;
int result;

void setup() {
// put your setup code here, to run once:
pinMode(fire,INPUT);
pinMode(alarm,OUTPUT);
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
result=digitalRead(fire);
Serial.println(result);
if (result>0)
{
digitalWrite(alarm,HIGH);
delay(300);
digitalWrite(alarm,LOW);
delay(300);
Serial.println(“FIRE \n ImmEdiate Assistance”);
}
else
{
digitalWrite(alarm,LOW);
Serial.println(“Dont Worrry”);

}
}

Please read and follow the instructions in the How to use this forum post.

Edit your post to add code tags, post links to devices, post a wiring diagram, and explain what "not working" means.

What does a DVM read on the sensor output?

You may need a pull-up on the sensor output.

If this is a 0 to 5 signal, look at when the sensor changes state rather than its level.

An IR sensor might give false readings.

OP’s image: