Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
from qa_on_context import *
|
2 |
|
3 |
import gradio as gr
|
|
|
4 |
|
5 |
example_sample = [
|
6 |
"Margarita with a Straw is a 2014 Indian Hindi-language drama film directed by Shonali Bose. It stars Kalki Koechlin (pictured) as an Indian teenager with cerebral palsy who relocates to America for her undergraduate education and comes of age following her complex relationship with a blind girl",
|
@@ -16,6 +17,14 @@ def demo_func(text):
|
|
16 |
req.append(ele.values.tolist())
|
17 |
return {"output": req}
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
demo = gr.Interface(
|
21 |
fn=demo_func,
|
|
|
1 |
from qa_on_context import *
|
2 |
|
3 |
import gradio as gr
|
4 |
+
from huggingface_hub import space_info
|
5 |
|
6 |
example_sample = [
|
7 |
"Margarita with a Straw is a 2014 Indian Hindi-language drama film directed by Shonali Bose. It stars Kalki Koechlin (pictured) as an Indian teenager with cerebral palsy who relocates to America for her undergraduate education and comes of age following her complex relationship with a blind girl",
|
|
|
17 |
req.append(ele.values.tolist())
|
18 |
return {"output": req}
|
19 |
|
20 |
+
markdown_exp_size = "##"
|
21 |
+
lora_repo = "svjack/chatglm3-few-shot"
|
22 |
+
lora_repo_link = "svjack/chatglm3-few-shot/?input_list_index=4"
|
23 |
+
emoji_info = space_info(lora_repo).__dict__["cardData"]["emoji"]
|
24 |
+
space_cnt = 1
|
25 |
+
task_name = "[---Question Answer generate by Context---]"
|
26 |
+
description = f"{markdown_exp_size} {task_name} few shot prompt in ChatGLM3 Few Shot space repo (click submit to activate) : [{lora_repo_link}](https://huggingface.co/spaces/{lora_repo_link}) {emoji_info}"
|
27 |
+
|
28 |
|
29 |
demo = gr.Interface(
|
30 |
fn=demo_func,
|