Commit
·
df8c52d
1
Parent(s):
5d62a8e
bruh
Browse files
app.py
CHANGED
@@ -47,7 +47,6 @@ def webpage_to_json(content: str, is_url: bool, schema_name: str) -> Dict[str, A
|
|
47 |
# Initialize pipeline components
|
48 |
preprocessor = BasicPreprocessor(config={'keep_tags': False})
|
49 |
try:
|
50 |
-
print("Here is your API", os.getenv('GEMINI_API_KEY'))
|
51 |
llm = GeminiLLMClient(config={'api_key': os.getenv('GEMINI_API_KEY')})
|
52 |
except Exception as e:
|
53 |
return {"error": f"Failed to initialize LLM client: {str(e)}"}
|
@@ -58,8 +57,8 @@ def webpage_to_json(content: str, is_url: bool, schema_name: str) -> Dict[str, A
|
|
58 |
|
59 |
try:
|
60 |
result = pipeline.run(content, is_url, schema)
|
61 |
-
|
62 |
-
|
63 |
return result
|
64 |
except Exception as e:
|
65 |
return {"error": f"Processing error: {str(e)}"}
|
|
|
47 |
# Initialize pipeline components
|
48 |
preprocessor = BasicPreprocessor(config={'keep_tags': False})
|
49 |
try:
|
|
|
50 |
llm = GeminiLLMClient(config={'api_key': os.getenv('GEMINI_API_KEY')})
|
51 |
except Exception as e:
|
52 |
return {"error": f"Failed to initialize LLM client: {str(e)}"}
|
|
|
57 |
|
58 |
try:
|
59 |
result = pipeline.run(content, is_url, schema)
|
60 |
+
print("-"*80)
|
61 |
+
print(f"Processed result: {result}")
|
62 |
return result
|
63 |
except Exception as e:
|
64 |
return {"error": f"Processing error: {str(e)}"}
|