sayyedAhmed commited on
Commit
744b965
·
1 Parent(s): 4441f04

update code

Browse files
Files changed (1) hide show
  1. inference.py +13 -0
inference.py CHANGED
@@ -22,3 +22,16 @@
22
 
23
  # # Print the response (the predictions)
24
  # print(response.json())
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  # # Print the response (the predictions)
24
  # print(response.json())
25
+
26
+ from transformers import pipeline
27
+
28
+ # Specify the model you want to use
29
+ model_name = "sayyedAhmed/Crisis_Severity_Predictor_LSTM"
30
+
31
+ # Create the pipeline with manual framework specification (using 'tf' for TensorFlow)
32
+ classifier = pipeline("text-classification", model=model_name, framework="tf")
33
+
34
+ # Use the pipeline to run inference
35
+ result = classifier("Example text for classification.")
36
+ print(result)
37
+