Spaces:
Sleeping
Sleeping
ai_file_process.py
Browse files测试huggingface space
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
AI抽取文件内容,生成问答对 基于gradio
|
| 3 |
+
"""
|
| 4 |
+
|
| 5 |
+
import gradio as gr
|
| 6 |
+
|
| 7 |
+
def greet(name, intensity):
|
| 8 |
+
return "Hello, " + name + "!" * int(intensity)
|
| 9 |
+
|
| 10 |
+
demo = gr.Interface(
|
| 11 |
+
fn=greet,
|
| 12 |
+
inputs=["text", "slider"],
|
| 13 |
+
outputs=["text"],
|
| 14 |
+
)
|
| 15 |
+
|
| 16 |
+
demo.launch(share=True)
|