Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -53,7 +53,7 @@ llm = ChatOpenAI(
|
|
53 |
# Function to generate a more appropriate name based on content
|
54 |
def generate_name_based_on_content(text,industry):
|
55 |
prompt = f"Generate a meaningful file name for the following content: {text[:200]} based {industry}" # Truncate text to first 200 characters
|
56 |
-
response = llm(prompt)
|
57 |
|
58 |
# Extract the generated file name and clean it
|
59 |
file_name = response.strip() # Strip any unnecessary whitespace or characters
|
|
|
53 |
# Function to generate a more appropriate name based on content
|
54 |
def generate_name_based_on_content(text,industry):
|
55 |
prompt = f"Generate a meaningful file name for the following content: {text[:200]} based {industry}" # Truncate text to first 200 characters
|
56 |
+
response = llm([HumanMessage(content=prompt)]).content
|
57 |
|
58 |
# Extract the generated file name and clean it
|
59 |
file_name = response.strip() # Strip any unnecessary whitespace or characters
|