huduo commited on
Commit
9481d20
verified
1 Parent(s): bbcf691

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +10 -0
  2. requirements.txt +1 -0
app.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import os
3
+
4
+ def run_ollama(prompt):
5
+ # 浣跨敤 Ollama 杩愯鍛戒护
6
+ response = os.popen(f"ollama run hf.co/{prompt}").read()
7
+ return response
8
+
9
+ iface = gr.Interface(fn=run_ollama, inputs="text", outputs="text", title="Ollama Model Runner")
10
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio