Spaces:
Runtime error
Runtime error
LovnishVerma
commited on
Commit
•
0710e36
1
Parent(s):
b02a8ce
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,18 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
# Load the fine-tuned Llama 2 model
|
4 |
+
model = gr.load("models/mlabonne/llama-2-7b-guanaco")
|
5 |
+
|
6 |
+
# Create a Gradio interface
|
7 |
+
iface = gr.Interface(
|
8 |
+
fn=model, # Use the fine-tuned Llama 2 model as the function
|
9 |
+
inputs="text", # Input is text
|
10 |
+
outputs="text", # Output is also text
|
11 |
+
live=True, # Enable live updates without button click
|
12 |
+
interpretation="default", # Use default interpretation for text outputs
|
13 |
+
theme="compact", # Use a compact theme for the interface
|
14 |
+
description="Fine-tuned Llama 2: Enter a prompt to get a model-generated response."
|
15 |
+
)
|
16 |
+
|
17 |
+
# Launch the Gradio app
|
18 |
+
iface.launch()
|