
We generally use an existing object with either positive or negative charge, to decide about the charge on the new object.
The glass rubbed with silk is supposed to have positive charge by convention. Hence, when this is attracted by the new object, then the charge on the new object is negative. But if it is repelled by the new charged object, then it is positively charged.