Spaces:
Sleeping
Sleeping
Commit
·
924cad9
1
Parent(s):
8af2d27
Add category log
Browse files- .gitignore +2 -1
- app.py +1 -1
.gitignore
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
.conda
|
2 |
temp*
|
3 |
-
__pycache__/
|
|
|
|
1 |
.conda
|
2 |
temp*
|
3 |
+
__pycache__/
|
4 |
+
env/
|
app.py
CHANGED
@@ -96,7 +96,6 @@ def categorize_extracted_text(extracted_text):
|
|
96 |
|
97 |
|
98 |
def extract_from_category(category, extracted_text):
|
99 |
-
# gr.Info("Received category: " + category)
|
100 |
if not category:
|
101 |
return (
|
102 |
gr.Chatbot.update(None),
|
@@ -105,6 +104,7 @@ def extract_from_category(category, extracted_text):
|
|
105 |
gr.Button.update(interactive=False),
|
106 |
)
|
107 |
category = Category[category]
|
|
|
108 |
chain = categories.category_modules[category].chain
|
109 |
formatted_prompt = chain.prompt.format_prompt(
|
110 |
text=extracted_text,
|
|
|
96 |
|
97 |
|
98 |
def extract_from_category(category, extracted_text):
|
|
|
99 |
if not category:
|
100 |
return (
|
101 |
gr.Chatbot.update(None),
|
|
|
104 |
gr.Button.update(interactive=False),
|
105 |
)
|
106 |
category = Category[category]
|
107 |
+
print("Extracting text from", category)
|
108 |
chain = categories.category_modules[category].chain
|
109 |
formatted_prompt = chain.prompt.format_prompt(
|
110 |
text=extracted_text,
|