Spaces:
Running
Running
Commit
•
1b9ed07
1
Parent(s):
e7ca22f
experiment2
Browse files- app.py +4 -18
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,21 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from absa_evaluator import AbsaEvaluatorTest
|
|
|
|
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
return evaluator.compute(predictions, references)
|
7 |
-
|
8 |
-
def main():
|
9 |
-
iface = gr.Interface(
|
10 |
-
fn=evaluate_texts, # The evaluation function you want to use
|
11 |
-
inputs=[
|
12 |
-
gr.Textbox(lines=2, placeholder="Enter Predictions Here..."),
|
13 |
-
gr.Textbox(lines=2, placeholder="Enter References Here...")
|
14 |
-
],
|
15 |
-
outputs=gr.Textbox()
|
16 |
-
)
|
17 |
-
|
18 |
-
iface.launch()
|
19 |
-
|
20 |
-
if __name__ == "__main__":
|
21 |
-
main()
|
|
|
1 |
import gradio as gr
|
2 |
from absa_evaluator import AbsaEvaluatorTest
|
3 |
+
import evaluate
|
4 |
+
from evaluate.utils import launch_gradio_widget
|
5 |
|
6 |
+
module = evaluate.load("absa_evaluator.py")
|
7 |
+
launch_gradio_widget(module)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
git+https://github.com/huggingface/evaluate@a4bdc10c48a450b978d91389a48dbb5297835c7d
|
2 |
scikit-learn
|
3 |
-
gradio
|
|
|
1 |
git+https://github.com/huggingface/evaluate@a4bdc10c48a450b978d91389a48dbb5297835c7d
|
2 |
scikit-learn
|
3 |
+
gradio==3.50
|