Spaces:
Build error

File size: 587 Bytes
48738dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr
import subprocess

# Funktion für das Modell
def generate_response(prompt):
    result = subprocess.run(
        ["./llama.cpp/main", "-m", "/models/Falcon3-7B-Instruct-q4_0.gguf", "-p", prompt], 
        capture_output=True, text=True
    )
    return result.stdout

# Gradio Interface
iface = gr.Interface(
    fn=generate_response,
    inputs=gr.Textbox(label="Eingabe"),
    outputs=gr.Textbox(label="Antwort"),
    title="Falcon 7B Chatbot",
    description="Gib eine Eingabe ein und erhalte eine Antwort vom Falcon 7B GGUF-Modell."
)

# Starten
iface.launch()