-2

I have a python file:

import stanza
#stanza.download('en')  # download English model
nlp = stanza.Pipeline('en') # initialize English neural pipeline
doc = nlp("I am a girl.") # run annotation over a sentence
for sentence in doc.sentences:
    for word in sentence.words:
        print(word.text,end="/")
        print(word.lemma,end="/")
        print(word.pos,end="/ ")

The output of this python file is: I/I/PROPN is/be/AUX a/a/DET girl/girl/NOUN ././PUNCT

Now, I want to fetch this external python file output in Django. And display the same output in a text-area. How to achieve this?

I am a beginner in Django. Can anyone please help me?

code
  • 3
  • 3

1 Answers1

0

If you want to use external python scripts in your views ... check this , using external scripts in python

if you are wondering how to use python in django and have no idea what a view is then I would suggest you to learn more on django from some tutorials and then proceed rather asking here.

And as @KlausD. has mentioned please be more precise and give more information so that people can understand and guide you.

SANGEETH SUBRAMONIAM
  • 1,098
  • 1
  • 9
  • 10