Spaces:
Runtime error
Runtime error
Commit
·
29b7662
1
Parent(s):
b3044ef
test2
Browse files
app.py
CHANGED
@@ -126,7 +126,6 @@ def process_text(model_name, task, text):
|
|
126 |
response1 = gpt_pipeline(strategy1)
|
127 |
response2 = gpt_pipeline(strategy2)
|
128 |
response3 = gpt_pipeline(strategy3)
|
129 |
-
return (response1, response2, response3)
|
130 |
elif task == 'Chunking':
|
131 |
strategy1 = template_all.format(text)
|
132 |
strategy2 = prompt2_chunk.format(text)
|
@@ -135,7 +134,6 @@ def process_text(model_name, task, text):
|
|
135 |
response1 = gpt_pipeline(strategy1)
|
136 |
response2 = gpt_pipeline(strategy2)
|
137 |
response3 = gpt_pipeline(strategy3)
|
138 |
-
return (response1, response2, response3)
|
139 |
elif task == 'Parsing':
|
140 |
strategy1 = template_all.format(text)
|
141 |
strategy2 = prompt2_parse.format(text)
|
@@ -144,7 +142,8 @@ def process_text(model_name, task, text):
|
|
144 |
response1 = gpt_pipeline(strategy1)
|
145 |
response2 = gpt_pipeline(strategy2)
|
146 |
response3 = gpt_pipeline(strategy3)
|
147 |
-
|
|
|
148 |
|
149 |
# Define prompts for each strategy based on the task
|
150 |
#strategy_prompts = {
|
|
|
126 |
response1 = gpt_pipeline(strategy1)
|
127 |
response2 = gpt_pipeline(strategy2)
|
128 |
response3 = gpt_pipeline(strategy3)
|
|
|
129 |
elif task == 'Chunking':
|
130 |
strategy1 = template_all.format(text)
|
131 |
strategy2 = prompt2_chunk.format(text)
|
|
|
134 |
response1 = gpt_pipeline(strategy1)
|
135 |
response2 = gpt_pipeline(strategy2)
|
136 |
response3 = gpt_pipeline(strategy3)
|
|
|
137 |
elif task == 'Parsing':
|
138 |
strategy1 = template_all.format(text)
|
139 |
strategy2 = prompt2_parse.format(text)
|
|
|
142 |
response1 = gpt_pipeline(strategy1)
|
143 |
response2 = gpt_pipeline(strategy2)
|
144 |
response3 = gpt_pipeline(strategy3)
|
145 |
+
|
146 |
+
return (response1, response2, response3)
|
147 |
|
148 |
# Define prompts for each strategy based on the task
|
149 |
#strategy_prompts = {
|