2d character controller

I am in the process of making a 2d character controller but I get an error but it is not a scripting error. When the character moves in the right direction the character doesn’t use the animation which is set by the animator it uses after a certain time for about 2 seconds then stops this continues until it falls of
Here is the script:

using UnityEngine;
using System.Collections;

public class characterMovement : MonoBehaviour {
	float speed = 5;
	Animator anim;
	
	
	void  Start ()
	{
		anim = GetComponent<Animator>();
	}
	
	
	void  Update ()
	{
		anim.SetFloat ("Speed", Mathf.Abs (Input.GetAxis ("Horizontal")));
		transform.Translate(speed * Time.deltaTime, 0f, 0f);
		
	}
}

// Update is called once per frame
void Update () {
if(Input.GetAxisRaw(“Horizontal”) > 0.5f || Input.GetAxisRaw(“Horizontal”) < -0.5F )

	{	
	    transform.Translate (new Vector3(Input.GetAxisRaw("Horizontal") * moveSpeed * Time.deltaTime, 0f, 0f));
    }

    if(Input.GetAxisRaw("Vertical") > 0.5f || Input.GetAxisRaw("Vertical") < -0.5F )
    {	
        transform.Translate (new Vector3(0f, Input.GetAxisRaw("Vertical") * moveSpeed * Time.deltaTime, 0f));

    }

}

}