Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -34,14 +34,9 @@ def perform_asde_inference(text, dataset, model_id):
|
|
34 |
df = pd.read_csv('pyabsa_english.csv')
|
35 |
random_i = np.random.randint(low=0, high=df.shape[0], size=(1,)).flat[0]
|
36 |
selected_df = df.iloc[random_i]
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
print(selected_df['actual_aspects'])
|
41 |
-
print(selected_df['actual_sentiments'])
|
42 |
-
text = str(selected_df['clean_text'].iloc[0])
|
43 |
-
true_aspect = str(selected_df['actual_aspects'].iloc[0])
|
44 |
-
true_sentiment = str(selected_df['actual_sentiments'].iloc[0])
|
45 |
|
46 |
|
47 |
bos_instruction = """Definition: The output will be the aspects (both implicit and explicit) and the aspects sentiment polarity. In cases where there are no aspects the output should be noaspectterm:none.
|
|
|
34 |
df = pd.read_csv('pyabsa_english.csv')
|
35 |
random_i = np.random.randint(low=0, high=df.shape[0], size=(1,)).flat[0]
|
36 |
selected_df = df.iloc[random_i]
|
37 |
+
text = selected_df['clean_text']
|
38 |
+
true_aspect = selected_df['actual_aspects']
|
39 |
+
true_sentiment = selected_df['actual_sentiments']
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
|
42 |
bos_instruction = """Definition: The output will be the aspects (both implicit and explicit) and the aspects sentiment polarity. In cases where there are no aspects the output should be noaspectterm:none.
|