File size: 540 Bytes
d6cb6d6
0e2af1d
d6cb6d6
6f94172
 
 
0eab763
b465350
 
 
 
 
 
 
 
6f94172
 
b465350
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr

def greet(input_text):
    # Example call to a compiled llama.cpp binary (replace with real model path)
    # subprocess.run(["./llama.cpp/main", "-m", "models/llama-7b.gguf", "-p", input_text])
    return f"Llama.cpp would process: {input_text}"

def run():
    
    demo = gr.Interface(
        fn=greet,
        inputs=gr.Textbox(label="Enter text"),
        outputs="text",
        title="Llama.cpp + Gradio Demo"
    )

    demo.launch(server_name="0.0.0.0", server_port=7860)

if __name__ == "__main__":
    run()