Dave67350 commited on
Commit
335b507
·
verified ·
1 Parent(s): 3d18a07

Update Gradio_UI.py

Browse files
Files changed (1) hide show
  1. Gradio_UI.py +0 -26
Gradio_UI.py CHANGED
@@ -24,32 +24,6 @@ from smolagents.agents import ActionStep, MultiStepAgent
24
  from smolagents.memory import MemoryStep
25
  from smolagents.utils import _is_package_available
26
 
27
- import os
28
- import gradio as gr
29
- from compl_ai.compliance_checker import ComplianceChecker # Import Compl-AI
30
-
31
- # Initialize Compl-AI compliance checker
32
- checker = ComplianceChecker()
33
-
34
- def check_compliance(text):
35
- """Function to process text and return compliance results."""
36
- result = checker.evaluate(text)
37
- return result
38
-
39
- def compliance_interface(text):
40
- return check_compliance(text)
41
-
42
- iface = gr.Interface(
43
- fn=compliance_interface,
44
- inputs="text",
45
- outputs="text",
46
- title="AI Compliance Checker",
47
- description="Check AI-generated content for compliance using Compl-AI."
48
- )
49
-
50
- if __name__ == "__main__":
51
- iface.launch()
52
-
53
 
54
  def pull_messages_from_step(
55
  step_log: MemoryStep,
 
24
  from smolagents.memory import MemoryStep
25
  from smolagents.utils import _is_package_available
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  def pull_messages_from_step(
29
  step_log: MemoryStep,