HinaCortus commited on
Commit
b1d7fd2
1 Parent(s): a2519d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -2,6 +2,8 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
2
  from transformers import TextClassificationPipeline
3
  from shiny import App, Inputs
4
 
 
 
5
  def classification(input: Inputs):
6
  model_name = 'lincoln/flaubert-mlsum-topic-classification'
7
 
@@ -13,8 +15,9 @@ def classification(input: Inputs):
13
  print(result)
14
  return result
15
 
16
-
17
- if "main" in "__main__":
18
- print('Processing')
19
- Inputs = "Le Bayern Munich prend la grenadine."
20
- classification(Inputs)
 
 
2
  from transformers import TextClassificationPipeline
3
  from shiny import App, Inputs
4
 
5
+ www_dir = Path(__file__).parent.resolve() / "www"
6
+
7
  def classification(input: Inputs):
8
  model_name = 'lincoln/flaubert-mlsum-topic-classification'
9
 
 
15
  print(result)
16
  return result
17
 
18
+ app = App(
19
+ print('Processing'),
20
+ Inputs = "Le Bayern Munich prend la grenadine.",
21
+ classification(Inputs),
22
+ static_assets=str(www_dir),
23
+ )