lorenzoscottb commited on
Commit
e57de1a
Β·
1 Parent(s): ba9b1bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -18
app.py CHANGED
@@ -1,16 +1,6 @@
1
  import gradio as gr
2
- import os
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'])
10
-
11
- read_token = str(os.environ['read_token'])
12
- read_token_ii = str(os.environ['read_token_ii'])
13
-
14
  languages = pd.read_csv("model_lang.csv", names=["Lang_acr"])
15
 
16
 
@@ -77,35 +67,31 @@ interface_words = gr.Interface(
77
  )
78
 
79
  interface_model_L = gr.Interface.load(
80
- name=path_to_L_model,
81
  description=description_L,
82
  examples=examples,
83
  title="DSA Large Multilingual",
84
- api_key=read_token,
85
  )
86
 
87
  interface_model_S = gr.Interface.load(
88
- name=path_to_S_model,
89
  description=description_S,
90
  examples=examples[0],
91
  title="DSA Base English-Only",
92
- api_key=read_token_ii,
93
  )
94
 
95
  interface_model_G = gr.Interface.load(
96
- name=path_to_generation_model,
97
  description=description_G,
98
  examples=examples_g,
99
  title="DSA Generation",
100
- api_key=read_token_ii,
101
  )
102
 
103
  interface_model_NER = gr.Interface.load(
104
- name=path_to_GNER_model,
105
  description=description_GNER,
106
  examples=examples_g,
107
  title="NER Generation",
108
- api_key=read_token_ii,
109
  )
110
 
111
  gr.TabbedInterface(
 
1
  import gradio as gr
 
2
  import pandas as pd
3
 
 
 
 
 
 
 
 
 
 
4
  languages = pd.read_csv("model_lang.csv", names=["Lang_acr"])
5
 
6
 
 
67
  )
68
 
69
  interface_model_L = gr.Interface.load(
70
+ name="huggingface/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-presence",
71
  description=description_L,
72
  examples=examples,
73
  title="DSA Large Multilingual",
 
74
  )
75
 
76
  interface_model_S = gr.Interface.load(
77
+ name="huggingface/DReAMy-lib/bert-base-cased-DreamBank-emotion-presence",
78
  description=description_S,
79
  examples=examples[0],
80
  title="DSA Base English-Only",
 
81
  )
82
 
83
  interface_model_G = gr.Interface.load(
84
+ name="huggingface/DReAMy-lib/t5-base-DreamBank-Generation-Emot-Char",
85
  description=description_G,
86
  examples=examples_g,
87
  title="DSA Generation",
 
88
  )
89
 
90
  interface_model_NER = gr.Interface.load(
91
+ name="huggingface/DReAMy-lib/t5-base-DreamBank-Generation-NER-Char",
92
  description=description_GNER,
93
  examples=examples_g,
94
  title="NER Generation",
 
95
  )
96
 
97
  gr.TabbedInterface(