NextAITeam commited on
Commit
14fa9f0
·
verified ·
1 Parent(s): a745e57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -1,14 +1,19 @@
1
  from transformers import pipeline
2
  import gradio as gr
3
 
 
 
4
  classifier = pipeline(
5
  "text-classification",
6
  model="MTE313/NEXARA_Model"
7
  )
8
 
 
 
9
  def predict(text):
10
- result = classifier(text)
11
- return result
 
12
 
13
  demo = gr.Interface(
14
  fn=predict,
@@ -16,4 +21,9 @@ demo = gr.Interface(
16
  outputs="json"
17
  )
18
 
19
- demo.launch()
 
 
 
 
 
 
1
  from transformers import pipeline
2
  import gradio as gr
3
 
4
+ print("Loading model...")
5
+
6
  classifier = pipeline(
7
  "text-classification",
8
  model="MTE313/NEXARA_Model"
9
  )
10
 
11
+ print("Model loaded")
12
+
13
  def predict(text):
14
+ return classifier(text)
15
+
16
+ print("Creating interface")
17
 
18
  demo = gr.Interface(
19
  fn=predict,
 
21
  outputs="json"
22
  )
23
 
24
+ print("Launching")
25
+
26
+ demo.launch(
27
+ server_name="0.0.0.0",
28
+ server_port=7860
29
+ )