Skip to content

Instantly share code, notes, and snippets.

@vaibhavgehani
Created July 26, 2020 16:29
Show Gist options
  • Select an option

  • Save vaibhavgehani/c6f82d2341aebc27ee6c31d7d063e1f7 to your computer and use it in GitHub Desktop.

Select an option

Save vaibhavgehani/c6f82d2341aebc27ee6c31d7d063e1f7 to your computer and use it in GitHub Desktop.
goToSelectfile(event: any) {
this.fileObj = event.target.files[0];
}
sendName() {
const uploadData = new FormData();
uploadData.append('file', this.fileObj);
this.http.post('http://127.0.0.1:5000/getText', uploadData).subscribe((res: any) => {
this.show = true;
this.line = res.outputText;
this.sentiment = res.predSentiment;
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment