Spaces:
Running
Running
Update app.py
Browse files
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/
|
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">
|
181 |
text_input = gr.Textbox(label="Your text", type="text", lines=1)
|
182 |
-
text_button = gr.Button("
|
183 |
-
text_output = gr.HTML(label="
|
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__":
|