hossamdaoud
commited on
Commit
•
ca8155f
1
Parent(s):
1c15ff4
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,20 @@
|
|
1 |
from huggingface_hub import InferenceClient
|
2 |
import gradio as gr
|
|
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
|
9 |
def format_prompt(message, history):
|
|
|
1 |
from huggingface_hub import InferenceClient
|
2 |
import gradio as gr
|
3 |
+
import os
|
4 |
|
5 |
+
def predict(image):
|
6 |
+
# Your prediction function here
|
7 |
+
return image
|
8 |
+
|
9 |
+
interface = gr.Interface(
|
10 |
+
fn=predict,
|
11 |
+
inputs=gr.inputs.Image(type="pil", default=os.path.join(os.getcwd(), "laila.png")), # Image component with default value set to laila.png
|
12 |
+
outputs="image", # Output will also be an image
|
13 |
+
|
14 |
+
title="Your Interface Title Here"
|
15 |
+
|
16 |
+
|
17 |
+
client = InferenceClient("mistralai/Mixtral-8x7B-Instruct-v0.1")
|
18 |
|
19 |
|
20 |
def format_prompt(message, history):
|