Using the RDKit module, it is very easy to generate the chemical structure for a given compound. First, convert SMILES to molecule using the Chem.MolFromSmiles() function, then use the Draw.MolToImage() function to generate the chemical structure using the molecule.
Here is an example:
from rdkit import Chem
from rdkit.Chem import Draw
smiles = 'O=c1c2cc([N+](=O)[O-])ccc2nc(CN2CCCCC2)n1-c1ccccc1F'
mol = Chem.MolFromSmiles(smiles)
img = Draw.MolToImage(mol)
img.show()
The above code will generate the following chemical structure: