[?] Read and map data from a file and create a graph?

Hi I am new to Mathematica and i’m trying to read a .txt file that has 3 elements in each line separated by a whitespace. The .txt file can have as many lines as it wants.
I am trying to set up a Directed Weighted Graph using the data in the .txt file while reading it

.txt file goes like this

E.g. ( I want to construct a directed weighted graph like this while reading the file

enter cograph = Graph[{"Adam" -> "Sally", "Adam" -> "Bob", "Sally" -> "Bob"}, EdgeWeight-> {10, 5, 3}]de here

Hi Huakai,

data = Import["~/file.txt", "Table"]
edges = Thread[data[[All, 1]] -> data[[All, 2]]]
weights = data[[All, 3]]
g = Graph[edges, EdgeWeight -> weights, VertexLabels -> Automatic]

Thank you sir! This works great!