Spaces:
Runtime error
Runtime error
Commit
·
36ad8c4
1
Parent(s):
9d19aed
Added dirs
Browse files
app.py
CHANGED
@@ -1,8 +1,6 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from run_llm import main
|
3 |
-
import argparse
|
4 |
-
|
5 |
-
theme = gr.themes.Soft()
|
6 |
|
7 |
def run_llm_interface(model, task, sentence):
|
8 |
args = argparse.Namespace(
|
@@ -13,6 +11,11 @@ def run_llm_interface(model, task, sentence):
|
|
13 |
)
|
14 |
main(args)
|
15 |
|
|
|
|
|
|
|
|
|
|
|
16 |
# Read the outputs from the result files
|
17 |
with open(f'result/prompt1_qa/{model}/ptb/per_ent/NOUN/0.txt', 'r') as f:
|
18 |
output_1 = f.read()
|
|
|
1 |
+
import os
|
2 |
import gradio as gr
|
3 |
from run_llm import main
|
|
|
|
|
|
|
4 |
|
5 |
def run_llm_interface(model, task, sentence):
|
6 |
args = argparse.Namespace(
|
|
|
11 |
)
|
12 |
main(args)
|
13 |
|
14 |
+
# Create directories if they don't exist
|
15 |
+
os.makedirs(f'result/prompt1_qa/{model}/ptb/per_ent/NOUN', exist_ok=True)
|
16 |
+
os.makedirs(f'result/prompt2_instruction/chunking/{model}/ptb', exist_ok=True)
|
17 |
+
os.makedirs(f'result/prompt3_structured_prompt/chunking/{model}/ptb', exist_ok=True)
|
18 |
+
|
19 |
# Read the outputs from the result files
|
20 |
with open(f'result/prompt1_qa/{model}/ptb/per_ent/NOUN/0.txt', 'r') as f:
|
21 |
output_1 = f.read()
|