Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,9 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
-
#
|
| 5 |
client = InferenceClient("InfAI/parlbert-german-law")
|
| 6 |
|
| 7 |
-
|
| 8 |
def respond(
|
| 9 |
message,
|
| 10 |
history: list[tuple[str, str]],
|
|
@@ -38,7 +37,6 @@ def respond(
|
|
| 38 |
yield response
|
| 39 |
|
| 40 |
|
| 41 |
-
# Create the Gradio interface for chatbot interaction
|
| 42 |
demo = gr.ChatInterface(
|
| 43 |
respond,
|
| 44 |
additional_inputs=[
|
|
@@ -55,5 +53,6 @@ demo = gr.ChatInterface(
|
|
| 55 |
],
|
| 56 |
)
|
| 57 |
|
|
|
|
| 58 |
if __name__ == "__main__":
|
| 59 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from huggingface_hub import InferenceClient
|
| 3 |
|
| 4 |
+
# Use the German law-specific model
|
| 5 |
client = InferenceClient("InfAI/parlbert-german-law")
|
| 6 |
|
|
|
|
| 7 |
def respond(
|
| 8 |
message,
|
| 9 |
history: list[tuple[str, str]],
|
|
|
|
| 37 |
yield response
|
| 38 |
|
| 39 |
|
|
|
|
| 40 |
demo = gr.ChatInterface(
|
| 41 |
respond,
|
| 42 |
additional_inputs=[
|
|
|
|
| 53 |
],
|
| 54 |
)
|
| 55 |
|
| 56 |
+
|
| 57 |
if __name__ == "__main__":
|
| 58 |
demo.launch()
|