Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
-
# Initialize the Hugging Face Inference Client
|
| 5 |
client = InferenceClient()
|
| 6 |
|
| 7 |
# Function to stream the compliance suggestions as they are generated
|
|
@@ -50,7 +50,7 @@ with gr.Blocks() as app:
|
|
| 50 |
output_html = gr.HTML(label="Compliance Suggestions")
|
| 51 |
|
| 52 |
# Link button to function with inputs and outputs
|
| 53 |
-
analyze_button.click(fn=analyze_compliance_stream, inputs=[code_input, compliance_standard], outputs=output_html
|
| 54 |
|
| 55 |
# Run the Gradio app
|
| 56 |
-
app.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
+
# Initialize the Hugging Face Inference Client (you can set the api_key directly when you initialize the client)
|
| 5 |
client = InferenceClient()
|
| 6 |
|
| 7 |
# Function to stream the compliance suggestions as they are generated
|
|
|
|
| 50 |
output_html = gr.HTML(label="Compliance Suggestions")
|
| 51 |
|
| 52 |
# Link button to function with inputs and outputs
|
| 53 |
+
analyze_button.click(fn=analyze_compliance_stream, inputs=[code_input, compliance_standard], outputs=output_html)
|
| 54 |
|
| 55 |
# Run the Gradio app
|
| 56 |
+
app.launch()
|