Pclanglais commited on
Commit
98fced7
·
verified ·
1 Parent(s): ceed53e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,7 +12,7 @@ import pandas as pd
12
  # Define the device
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
 
15
- editorial_model = "PleIAs/Estienne"
16
  token_classifier = pipeline(
17
  "token-classification", model=editorial_model, aggregation_strategy="simple", device=device
18
  )
@@ -177,10 +177,10 @@ examples = [
177
  demo = gr.Blocks()
178
 
179
  with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
180
- gr.HTML("""<h1 style="text-align:center">Editorialize your text</h1>""")
181
  text_input = gr.Textbox(label="Your text", type="text", lines=1)
182
- text_button = gr.Button("Identify editorial structures")
183
- text_output = gr.HTML(label="Corrected text")
184
  text_button.click(mistral_bot.predict, inputs=text_input, outputs=[text_output])
185
 
186
  if __name__ == "__main__":
 
12
  # Define the device
13
  device = "cuda" if torch.cuda.is_available() else "cpu"
14
 
15
+ editorial_model = "PleIAs/Bibliography-Formatter"
16
  token_classifier = pipeline(
17
  "token-classification", model=editorial_model, aggregation_strategy="simple", device=device
18
  )
 
177
  demo = gr.Blocks()
178
 
179
  with gr.Blocks(theme='JohnSmith9982/small_and_pretty') as demo:
180
+ gr.HTML("""<h1 style="text-align:center">Reversed zotero</h1>""")
181
  text_input = gr.Textbox(label="Your text", type="text", lines=1)
182
+ text_button = gr.Button("Extract a structured bibtex")
183
+ text_output = gr.HTML(label="Metadata")
184
  text_button.click(mistral_bot.predict, inputs=text_input, outputs=[text_output])
185
 
186
  if __name__ == "__main__":