lorenzoscottb commited on
Commit
4c2e53d
β€’
1 Parent(s): 22c5e2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -3,6 +3,7 @@ import os
3
  import pandas as pd
4
 
5
  path_to_generation_model = str(os.environ['path_to_generation_model'])
 
6
 
7
  path_to_L_model = str(os.environ['path_to_L_model'])
8
  path_to_S_model = str(os.environ['path_to_S_model'])
@@ -40,6 +41,10 @@ description_G = """
40
  A t5 model tuned to performer text-generation, and predict emotion as well as the character experiencing those emotions.
41
  """
42
 
 
 
 
 
43
  example_main = ["en", "it", "pl"]
44
 
45
  examples = [
@@ -87,7 +92,15 @@ interface_model_G = gr.Interface.load(
87
  api_key=read_token_ii,
88
  )
89
 
 
 
 
 
 
 
 
 
90
  gr.TabbedInterface(
91
- [interface_words, interface_model_L, interface_model_S, interface_model_G],
92
- ["Intro", "Large Multilingual", "Base En", "En Generation"]
93
  ).launch()
 
3
  import pandas as pd
4
 
5
  path_to_generation_model = str(os.environ['path_to_generation_model'])
6
+ path_to_GNER_model = str(os.environ['path_to_GNER_model'])
7
 
8
  path_to_L_model = str(os.environ['path_to_L_model'])
9
  path_to_S_model = str(os.environ['path_to_S_model'])
 
41
  A t5 model tuned to performer text-generation, and predict emotion as well as the character experiencing those emotions.
42
  """
43
 
44
+ description_GNER = """
45
+ A t5 model tuned to performer text-generation, and predict which characters are present in the report.
46
+ """
47
+
48
  example_main = ["en", "it", "pl"]
49
 
50
  examples = [
 
92
  api_key=read_token_ii,
93
  )
94
 
95
+ interface_model_NER = gr.Interface.load(
96
+ name=path_to_GNER_model,
97
+ description=description_GNER,
98
+ examples=examples_g,
99
+ title="NER Generation",
100
+ api_key=read_token_ii,
101
+ )
102
+
103
  gr.TabbedInterface(
104
+ [interface_words, interface_model_L, interface_model_S, interface_model_G, interface_model_NER],
105
+ ["Intro", "SA Large Multilingual", "SA Base En", "SA En Generation", "NER Generation"]
106
  ).launch()