alpcansoydas
commited on
Commit
•
9ccf0ee
1
Parent(s):
a08048c
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def classify_text(text, company_name_input, company_sector_input, about_company_
|
|
48 |
input_variables=["TEXT", "COMPANY_NAME", "COMPANY_SECTOR", "ABOUT_COMPANY"]
|
49 |
)
|
50 |
formatted_prompt = prompt_classify.format(TEXT=text,
|
51 |
-
COMPANY_NAME=company_name_input
|
52 |
COMPANY_SECTOR=company_sector_input,
|
53 |
ABOUT_COMPANY=about_company_input
|
54 |
)
|
@@ -70,8 +70,8 @@ def classify_text(text, company_name_input, company_sector_input, about_company_
|
|
70 |
return parsed_output, duration #['Answer']
|
71 |
|
72 |
# Create the Gradio interface
|
73 |
-
def gradio_app(text):
|
74 |
-
classification, time_taken = classify_text(text)
|
75 |
return classification, f"Time taken: {time_taken:.2f} seconds"
|
76 |
|
77 |
def create_gradio_interface():
|
|
|
48 |
input_variables=["TEXT", "COMPANY_NAME", "COMPANY_SECTOR", "ABOUT_COMPANY"]
|
49 |
)
|
50 |
formatted_prompt = prompt_classify.format(TEXT=text,
|
51 |
+
COMPANY_NAME=company_name_input,
|
52 |
COMPANY_SECTOR=company_sector_input,
|
53 |
ABOUT_COMPANY=about_company_input
|
54 |
)
|
|
|
70 |
return parsed_output, duration #['Answer']
|
71 |
|
72 |
# Create the Gradio interface
|
73 |
+
def gradio_app(text, company_name_input, company_sector_input, about_company_input):
|
74 |
+
classification, time_taken = classify_text(text, company_name_input, company_sector_input, about_company_input)
|
75 |
return classification, f"Time taken: {time_taken:.2f} seconds"
|
76 |
|
77 |
def create_gradio_interface():
|