remove_counter
Browse files
app.py
CHANGED
|
@@ -11,8 +11,6 @@ download_datasets_from_github(os.getcwd())
|
|
| 11 |
|
| 12 |
dataset_items = {dataset.name: dataset for dataset in ABSADatasetList()}
|
| 13 |
|
| 14 |
-
URL = 'https://api.visitorbadge.io/api/combined?path=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fyangheng%2Fpyabsa_inference&label=Inference%20Count&labelColor=%2337d67a&countColor=%23f47373&style=flat&labelStyle=none'
|
| 15 |
-
|
| 16 |
def get_example(dataset):
|
| 17 |
task = 'apc'
|
| 18 |
dataset_file = detect_infer_dataset(dataset_items[dataset], task)
|
|
@@ -50,7 +48,6 @@ def perform_inference(text, dataset):
|
|
| 50 |
'confidence': [round(x, 4) for x in result[0]['confidence']],
|
| 51 |
'position': result[0]['position']
|
| 52 |
})
|
| 53 |
-
requests.get(URL)
|
| 54 |
return result, '{}'.format(text)
|
| 55 |
|
| 56 |
|
|
@@ -86,6 +83,6 @@ with demo:
|
|
| 86 |
outputs=[output_df, output_text])
|
| 87 |
|
| 88 |
gr.Markdown("")
|
| 89 |
-
|
| 90 |
|
| 91 |
demo.launch(share=True)
|
|
|
|
| 11 |
|
| 12 |
dataset_items = {dataset.name: dataset for dataset in ABSADatasetList()}
|
| 13 |
|
|
|
|
|
|
|
| 14 |
def get_example(dataset):
|
| 15 |
task = 'apc'
|
| 16 |
dataset_file = detect_infer_dataset(dataset_items[dataset], task)
|
|
|
|
| 48 |
'confidence': [round(x, 4) for x in result[0]['confidence']],
|
| 49 |
'position': result[0]['position']
|
| 50 |
})
|
|
|
|
| 51 |
return result, '{}'.format(text)
|
| 52 |
|
| 53 |
|
|
|
|
| 83 |
outputs=[output_df, output_text])
|
| 84 |
|
| 85 |
gr.Markdown("")
|
| 86 |
+
|
| 87 |
|
| 88 |
demo.launch(share=True)
|