koutch commited on
Commit
6f94172
·
1 Parent(s): bf0389c

trial again

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -1,12 +1,17 @@
1
  import gradio as gr
 
2
 
3
  def greet(input_text):
4
- return f"Hello, {input_text}!"
 
 
5
 
6
- app = gr.Interface(
7
  fn=greet,
8
  inputs=gr.Textbox(label="Enter text"),
9
  outputs="text",
10
- title="Simple Greeting App",
11
- description="Type something and see the response."
12
- ).launch(server_name="0.0.0.0", server_port=7860)
 
 
 
1
  import gradio as gr
2
+ import subprocess
3
 
4
  def greet(input_text):
5
+ # Example call to a compiled llama.cpp binary (replace with real model path)
6
+ # subprocess.run(["./llama.cpp/main", "-m", "models/llama-7b.gguf", "-p", input_text])
7
+ return f"Llama.cpp would process: {input_text}"
8
 
9
+ demo = gr.Interface(
10
  fn=greet,
11
  inputs=gr.Textbox(label="Enter text"),
12
  outputs="text",
13
+ title="Llama.cpp + Gradio Demo"
14
+ )
15
+
16
+ if __name__ == "__main__":
17
+ demo.launch(server_name="0.0.0.0", server_port=7860)