Spaces:
Runtime error
Runtime error
Commit
·
b3044ef
1
Parent(s):
04fc021
added response
Browse files
app.py
CHANGED
@@ -122,17 +122,29 @@ def process_text(model_name, task, text):
|
|
122 |
strategy1 = template_all.format(text)
|
123 |
strategy2 = prompt2_pos.format(text)
|
124 |
strategy3 = demon_pos
|
125 |
-
|
|
|
|
|
|
|
|
|
126 |
elif task == 'Chunking':
|
127 |
strategy1 = template_all.format(text)
|
128 |
strategy2 = prompt2_chunk.format(text)
|
129 |
strategy3 = demon_chunk
|
130 |
-
|
|
|
|
|
|
|
|
|
131 |
elif task == 'Parsing':
|
132 |
strategy1 = template_all.format(text)
|
133 |
strategy2 = prompt2_parse.format(text)
|
134 |
strategy3 = demon_parse
|
135 |
-
|
|
|
|
|
|
|
|
|
136 |
|
137 |
# Define prompts for each strategy based on the task
|
138 |
#strategy_prompts = {
|
|
|
122 |
strategy1 = template_all.format(text)
|
123 |
strategy2 = prompt2_pos.format(text)
|
124 |
strategy3 = demon_pos
|
125 |
+
|
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)
|
133 |
strategy3 = demon_chunk
|
134 |
+
|
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)
|
142 |
strategy3 = demon_parse
|
143 |
+
|
144 |
+
response1 = gpt_pipeline(strategy1)
|
145 |
+
response2 = gpt_pipeline(strategy2)
|
146 |
+
response3 = gpt_pipeline(strategy3)
|
147 |
+
return (response1, response2, response3)
|
148 |
|
149 |
# Define prompts for each strategy based on the task
|
150 |
#strategy_prompts = {
|