added numerapi to req
Browse files- app.py +3 -5
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -6,15 +6,13 @@ import os
|
|
| 6 |
anvil.server.connect('55MH4EBKM22EP4E6D5T6CVSL-VGO5X4SM6JEXGJVT')
|
| 7 |
import json
|
| 8 |
import ast
|
| 9 |
-
def
|
| 10 |
-
|
| 11 |
-
os.system(name+' > ./out.txt')
|
| 12 |
with open('./out.txt','r') as f: output=f.read()
|
| 13 |
return output
|
| 14 |
-
# return "Input Data: " + name + ", stay tuned for ML models from this API"
|
| 15 |
|
| 16 |
gradio_interface = gr.Interface(
|
| 17 |
-
fn=
|
| 18 |
inputs="text",
|
| 19 |
outputs="text",
|
| 20 |
title="REST API with Gradio and Huggingface Spaces",
|
|
|
|
| 6 |
anvil.server.connect('55MH4EBKM22EP4E6D5T6CVSL-VGO5X4SM6JEXGJVT')
|
| 7 |
import json
|
| 8 |
import ast
|
| 9 |
+
def run_script(scriptname):
|
| 10 |
+
os.system(scriptname+' > ./out.txt')
|
|
|
|
| 11 |
with open('./out.txt','r') as f: output=f.read()
|
| 12 |
return output
|
|
|
|
| 13 |
|
| 14 |
gradio_interface = gr.Interface(
|
| 15 |
+
fn=run_script,
|
| 16 |
inputs="text",
|
| 17 |
outputs="text",
|
| 18 |
title="REST API with Gradio and Huggingface Spaces",
|
requirements.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
anvil_uplink
|
| 2 |
-
|
|
|
|
| 1 |
anvil_uplink
|
| 2 |
+
numerapi
|